Jump to content


Photo

Help example truck_game


  • Please log in to reply
25 replies to this topic

#21 Tepi

Tepi

    GMC Member

  • Global Moderators
  • 4201 posts
  • Version:GM8.1

Posted 03 May 2012 - 04:54 PM


Object car, draw event, first action, replace both:

d3d_transform_add_rotation_z(direction+turn*20);
with
d3d_transform_add_rotation_z(direction);

Guys, really ?

It would be great if you could share exactly what change this code is suppose to change about the truck movement. After altering the code, I don't see that it prevents the body of the truck from moving ahead of the frame and wheels. Unless there's something I'm not seeing. Looking forward to your reply.

It prevents the wheels from turning to misalignment relative to the vehicle.

If it's the translational misalignment what he's concerned about, then changing the car step event into end step will fix it (this way the tire coordinates will be aligned according to the freshest value of direction).
  • 0

#22 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 03 May 2012 - 05:04 PM



Object car, draw event, first action, replace both:

d3d_transform_add_rotation_z(direction+turn*20);
with
d3d_transform_add_rotation_z(direction);

Guys, really ?

It would be great if you could share exactly what change this code is suppose to change about the truck movement. After altering the code, I don't see that it prevents the body of the truck from moving ahead of the frame and wheels. Unless there's something I'm not seeing. Looking forward to your reply.

It prevents the wheels from turning to misalignment relative to the vehicle.

If it's the translational misalignment what he's concerned about, then changing the car step event into end step will fix it (this way the tire coordinates will be aligned according to the freshest value of direction).

That makes sense. I just changed the STEP event as you mentioned, and it removed the misalignment. The body now rides solidly on top of the frame. Very astute Tepi.

I guess we'll wait to hear from our Russian friend to find out if your contribution meets his criteria. Thanks!
  • 0

#23 lollolc

lollolc

    GMC Member

  • GMC Member
  • 94 posts
  • Version:GM8

Posted 03 May 2012 - 09:50 PM

Object car, draw event, first action, replace both:

d3d_transform_add_rotation_z(direction+turn*20);
with
d3d_transform_add_rotation_z(direction);

Guys, really ?


In this way the front wheels do not steer.
The problem remains.
The problem is:
The vehicle begins to run and the body of the vehicle remains in front of the frame and wheels.
  • 0

#24 Tepi

Tepi

    GMC Member

  • Global Moderators
  • 4201 posts
  • Version:GM8.1

Posted 04 May 2012 - 09:00 AM

Read the next post I sent.
  • 0

#25 lollolc

lollolc

    GMC Member

  • GMC Member
  • 94 posts
  • Version:GM8

Posted 04 May 2012 - 02:28 PM

I'm Italian
It works!
I feel stupid.
The solution was before my eyes. Sometimes I should stop Game Maker for a few days and then again groped.

Thanks to all!
Grazie a tutti!
  • 0

#26 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 04 May 2012 - 06:27 PM

I'm Italian

Oops! Mi scusi!
Glad it's working for you now. I knew one of the brainiacs in this group would have the short, simple answer. : D
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users