How do I calculate opposite of a vector, add some slack

Posted by Jason94 on Game Development See other posts from Game Development or by Jason94
Published on 2012-11-13T09:32:31Z Indexed on 2012/11/13 11:23 UTC
Read the original article Hit count: 334

Filed under:
|

enter image description here

How can i calulate a valid range (RED) for my object's (BLACK) traveling direction (GREEN). The green is a Vector2 where x and y range is -1 to 1.

What I'm trying to do here is to create rocket fuel burn effekt. So what i got is

  • rocket speed (float)
  • rocket direction (Vector2 x = [-1, 1], y = [-1, 1])

I may think that rocket speed does not matter as fuel burn effect (particle) is created on position with its own speed.

© Game Development or respective owner

Related posts about XNA

Related posts about c#