Results 1 to 3 of 3
- 03-20-2012, 04:34 PM #1Member
- Join Date
- Sep 2011
- Rep Power
Java Graphics: Vehicle doing a turn
Let's say I have point A and point B separated by a distance d.
How can I move a certain object (a car per se) from A to B with a 45 degree turn? I have been working on a 3d game in Java and wrote most of the basic functions such as accelerate, decelerate, constant speed, etc but I am stuck at doing the turns.
can anyone give me a hint?
- 03-20-2012, 05:49 PM #2
Re: Java Graphics: Vehicle doing a turn
Can you explain what you are trying to do?
If a shape is being moved from A to B when does it change direction? When it gets to B? When it first leaves A?
Is the 45 deg change in direction to the left or right of the line from A to B?
Is the idea to get a new line of travel say A to C where the new line is a 45 deg change in direction from A-B?
Sounds like a trigonometry problem. Take a piece of paper and draw the lines and work out the formulas.If you don't understand my response, don't ignore it, ask a question.
- 03-20-2012, 10:15 PM #3
- By seongchog in forum Java AppletsReplies: 7Last Post: 03-01-2012, 10:53 AM
- By captain alge in forum New To JavaReplies: 8Last Post: 03-20-2011, 01:48 PM
- By anotsu in forum New To JavaReplies: 5Last Post: 03-11-2008, 12:48 AM
- By JavaBean in forum Java SoftwareReplies: 0Last Post: 11-12-2007, 07:01 PM
- By JavaBean in forum Java SoftwareReplies: 0Last Post: 06-23-2007, 08:25 PM