chandlerprall / Physijs

Physics plugin for Three.js
MIT License
2.77k stars 455 forks source link

object moviment #281

Open leonardopaiva opened 8 years ago

leonardopaiva commented 8 years ago

I'll create a code to move an object with physijs, based on control by the keyboard, there is some library ready to do this? so I do not have to start from scratch? i was using a library that uses mesh.position.x, but with physijs will be better use angularVelocity, right?

mmmovania commented 8 years ago

What kind of object are you moving. Usually for spherical objects like ball, I would apply a force at an offset from the ball's origin when the key is pressed (as shown in this tutorial example). For box like objects simply applying force without the offset would do.