Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8828477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:36:53+00:00 2026-06-14T07:36:53+00:00

How can i calulate a valid range (RED) for my object’s (BLACK) traveling direction

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:36:54+00:00Added an answer on June 14, 2026 at 7:36 am

    A cheap and cheerful trick with 2D vectors is to transpose the x and y, then flip the sign on one of them to get the perpendicular vector (pseudo code):

    Vector2 perpendicular ( -original.y, original.x ) // Or original.y, -original.x
    

    Then you could do something like:

    direction + perpendicular * rand(-0.3 , 0.3)
    

    Update: having realised the question asks for the opposite vector (too busy looking at the picture!) I figure I had better answer that too. Multiply ‘direction’ by -1 to get the opposite vector. So this:

    perpendicular * rand(-0.3 , 0.3) - direction
    

    should give you a random direction vector somewhere in your range (not normalised, but close enough for these purposes). Then you can multiply that result by a random number depending on how long you want the tail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can you calculate the following Friday at 3am as a datetime object? Clarification:
I'm trying to learn a little bit more about recursion but somehow I can't
I am trying to create an application that will calculate the cost of exotic
I'm new to Javascript and trying to learn some basics. Can you please check
I am trying to create a program that will take user inputs(marks) and output
By using date object how we can calculate over lapping weeks? For eg: July
I want to create some class that can calculate absolute or relative time period.
I'm trying to create the program to read each lines and calculate each line's
I can calculate the size of the files in a tarfile in this way:
Can someone explain with an example how we can calculate the time and space

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.