Steer command

Post Reply
User avatar
Support
Site Admin
Posts: 3459
Joined: Sun Oct 02, 2011 10:49 am

Steer command

Post by Support »

I've implemented a Steer command to allow the turning of a vehicle. Here is a quick low-res animation of it...

This would be great for the Stargate ground based vehicles @GateGirl86 @Okwa

Your support team.
https://SoftByteLabs.com
Okwa
Posts: 916
Joined: Mon Feb 27, 2023 1:34 am

Re: Steer command

Post by Okwa »

:salute :salute :salute :salute I could swear you just recorded a moving car and now say you animated it. OMG, compared to you I am a bungler at animating.
User avatar
Support
Site Admin
Posts: 3459
Joined: Sun Oct 02, 2011 10:49 am

Re: Steer command

Post by Support »

That's because I know all the commands, it's easier for me than it is for you.

This was the script for the car...

Code: Select all

// declare objects to use
uses
	'car', 'body',
  'wheel fr', 'wheel br', 'wheel fl', 'wheel bl',
  'wheel box fr', 'wheel box fl',
  'door - driver side';

// Set default units
SetUnits(Meters);
SetAngleUnits(Degree);

// initialize variable(s)
if FirstPass then begin
  wheelbase = Distance('wheel fr', 'wheel br');
  track = Distance('wheel fr', 'wheel fl');
  CurDist = 0;
  frontWheelAngle = 0;
end;

// scripts for object(s)
case object of

  'body':
  begin
    Look;
  end;

	'car':
	begin
    //Follow;
		Accelerate(py, 17, 1, 9);
    CurDist = py;
    Yaw(-47, 8, 16);
    Pitch(3.2, 11, 13.5);
    frontWheelAngle = Steer(rz, py, wheelbase, track);
	end;

  'wheel box fr', 'wheel box fl':
  begin
    RotZ = frontWheelAngle;
  end;

  'wheel fr', 'wheel fl', 'wheel br', 'wheel bl':
  begin
    Spin(Xaxis, CurDist);
  end;

  'door - driver side':
  begin
    // Opem and close the door
    //Yaw(45, 1, 3);
    //Yaw(-45, 4, 7);
  end;

end;
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Steer command

Post by GateGirl86 »

That is wonderful Michael. I would ask though, what would 'we' use as backgrounds? While that street scene is simply gorgeous, doing a sci-fi esque background is a whole new ball game.

I assume the front wheels would have to be separate assets?

<3 <3 <3
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3459
Joined: Sun Oct 02, 2011 10:49 am

Re: Steer command

Post by Support »

Thank you :)

The scene is not a background, it's an actual model so the car can go on the street because that can't work with a background. But what do you mean by "what would 'we' use as backgrounds?" ?

The 4 wheels are components inside the car component. The from wheels are a component inside a component so the wheel can spin while it's parent box can rotate and the parent, the car, make them follow the car, while they rotate and spin.
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Steer command

Post by GateGirl86 »

That was what I meant really. Your street model is superb, but making something like that to suit would be far beyond my capabilities.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3459
Joined: Sun Oct 02, 2011 10:49 am

Re: Steer command

Post by Support »

But you've done the runway for the 302, you could include tows and other four-wheeled vehicles in there too and use the Steer function as I did for the car.
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Steer command

Post by GateGirl86 »

Hmmm, I've been thinking about building a new base :mrgreen: :salute
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3459
Joined: Sun Oct 02, 2011 10:49 am

Re: Steer command

Post by Support »

With moving vehicles, that would be soooooo awesome :)
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Steer command

Post by GateGirl86 »

We may need traffic lights :lol:
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3459
Joined: Sun Oct 02, 2011 10:49 am

Re: Steer command

Post by Support »

:lol: and we can do that too :mrgreen:
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Steer command

Post by GateGirl86 »

I know we can :lol:
Image
"Come with me if you want to live."
Sarah Connor
Post Reply