Topic: help with vector please
using sponza as base, I manage to create basic FPS. Now my player can walk, run, sprint, jump, and when I click mouse it returns name of object in front of him. I can also load a text file, read it's content and clone an object in a certain location based on content of the file. Pretty good for 3 days I guess
but then my math fails me. Simply put:
I want to apply force to a chair, just like pushing or kicking the chair, when I click my mouse. I already can detect the chair using rayhit, what's left is applying force. It should be something like this if I'm not mistaken
addCentralForce(Chair, someVector)
my problem is determining this 'someVector'. How do I get right vector so I can apply the force at correct direction?
Thanks
[Edit]
I figure it must have some connection with rotation of Head/Camera. I can get that if that value. What I don't get is how to use that rotation value to figure our direction of force, because when I use that value, it simply doesn't work the way it should be
Last edited by penguinroad (2013-07-19 10:29:16)