- Home /
Moving by rotation of objects
I have a pseudo-2d flat plane with various blocks rotated on the z-axis. When my character encounters these blocks, I want him to climb the blocks by moving along their upward edges. He needs to get the rotation of the blocks and move along them without rotating himself. I cannot use the physics engine due to performance cost on mobile devices.
Can anyone help me approach this problem using vectors?
When you say you don't want to use Unity's physics engine, are you also talking about you don't want to use its built in collision detection?
Collision detection is ok, kinematic rigidbodies are ok. Once I start adding forces, my performance goes down the tubes. I've got the go ahead to keep the character moving at a standard speed and just sort of "trace" over the landscape, adjusting their movement directions as they encounter rotated objects.
There are also some answers in the corresponding forum thread at http://forum.unity3d.com/threads/83079-Scripted-movement-(with-amazing-hand-drawn-example!).