Hi guys
Kaisa ho ap Sabhi I hope this video is good.Scroll down for script
================================
Discord:
https://discord.com/invite/eXd6Rxt8DC
================================
My games:
Sporimestudio.itch.io
================================
((Script))
================================
/**
* @Author SPORIMEstudio
*/
public SpatialObject car;
public VehicleWheel fl,fr,bl,br;
public int Throttle,steer;
/// Run only once
@Override
public void start() {
}
/// Repeat every frame
@Override
public void repeat()
{
if(Input.getKey(“throttle”).isPressed())
{//forward moving
fl.setTorque(Throttle);
fr.setTorque(Throttle);
bl.setTorque(Throttle);
br.setTorque(Throttle);
}else if (Input.getKey(“rev”).isPressed())
{//this code for reverse torque of car
fl.setTorque(-Throttle);
fr.setTorque(-Throttle);
bl.setTorque(-Throttle);
br.setTorque(-Throttle);
}
//for steer the car
if(Input.getKey(“left”).isPressed())
{
fl.setSteer(steer);
fr.setSteer(steer);
}
else if (Input.getKey(“right”).isPressed())
{
fl.setSteer(-steer);
fr.setSteer(-steer);
}
}
================================
Thanks for watching✔️
source
14 comments
Chatgpt😎
First comment ❤❤
Comments are closed.
Add Comment