Results 1 to 3 of 3
  1. #1
    garnaout is offline Member
    Join Date
    Sep 2011
    Posts
    17
    Rep Power
    0

    Default 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?

    thanks

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,566
    Rep Power
    23

    Default 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.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Java Graphics: Vehicle doing a turn

    Haven't-a-clue questions don't belong in Advanced Java.

    Moving to Java 2D

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. why my car can not turn left and turn 5 round,Help!!THx
    By seongchog in forum Java Applets
    Replies: 7
    Last Post: 03-01-2012, 09:53 AM
  2. Non resizable java windows turn black
    By captain alge in forum New To Java
    Replies: 8
    Last Post: 03-20-2011, 12:48 PM
  3. how can i turn this java program to an applet
    By anotsu in forum New To Java
    Replies: 5
    Last Post: 03-10-2008, 11:48 PM
  4. JOpt.SDK Vehicle Routing Component 2.0.7
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-12-2007, 06:01 PM
  5. JOpt.SDK Vehicle Routing Component 2.0.5
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 06-23-2007, 07:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •