- Joined
- Sep 5, 2007
- Messages
- 358
Hey!
Ok, in the game I'm developing I need to calculate the bouncing angle when an object hits the walls.
It's in 2D perspective so no Z axis is required.
Also I don't use speed and angle to make my objects move, I use velocityX and velocityY instead.
I tried the angle = Pi - angle formula, but since I have to calculate back to vX and vY both velocities become inverted somehow.
Any help would be appreciated, if you are going to post a formula be sure to explain it, although I like it, math isn't my area of expertise.
I'll attach a simple draw of the effect I want to achieve, I think the draw is enough to understant.
Black Lines -> walls
Red Lines -> Object trajectory
Any idea on how this happens and how it can be solved. Well it isn't that of a big deal, but would be good to know how to fix it.
Thanks in advance
Ok, in the game I'm developing I need to calculate the bouncing angle when an object hits the walls.
It's in 2D perspective so no Z axis is required.
Also I don't use speed and angle to make my objects move, I use velocityX and velocityY instead.
I tried the angle = Pi - angle formula, but since I have to calculate back to vX and vY both velocities become inverted somehow.
Any help would be appreciated, if you are going to post a formula be sure to explain it, although I like it, math isn't my area of expertise.
I'll attach a simple draw of the effect I want to achieve, I think the draw is enough to understant.
Black Lines -> walls
Red Lines -> Object trajectory
GetSpellTargetX/Y Issue
I have the latest patch installed, I've updated my JNGP with the new hashtable native functions, however I don't seem to have the GetSpellTargetX and GetSpellTargetY functions on the functions list.Any idea on how this happens and how it can be solved. Well it isn't that of a big deal, but would be good to know how to fix it.
Thanks in advance
Attachments
Last edited: