Tu.Xiaomi Posted October 23, 2014 Share Posted October 23, 2014 How to use w, a, s, d to control the movement of an object? thanks in advance! Link to comment
ulf.schroeter Posted October 23, 2014 Share Posted October 23, 2014 Have a look into the samples Link to comment
necris Posted October 27, 2014 Share Posted October 27, 2014 tu.xiaomi,Sample with simplest implementation attached. In update() func. if(engine.app.getKeyState('w')) { Vec3 pos = node_ref.getWorldPosition(); Vec3 direction = node_ref.getWorldRotation() * vec3(0.0f,-1.0f,0.0f); node_ref.setWorldPosition(pos + direction / 100.0f); } ... etc. You can find more in sdk samples. Please check for example samples/physics/car_* (implementation through physics) or samples/players/actor_* Otherwise, please specify your question. wasd.rar Link to comment
Recommended Posts