New game idea, little help (Steering and driving)

Hey, (prepare yourself for a long one)

So first off, thank you to the people on here who have helped me in the past, I finished my first app. Waiting the paperwork to go through (little different when I am so young) and then I submit to Apple.

In the mean time, I want to start on my next project. A farm-type game (me from a farm in Alberta having an interest in that).

Picture this: An overhead view of a “Tractor” with a D-Pad to control it. First off, how would I go about steering it? I figured the physics would be best, velocity checking for forwards and backwards. But then comes the issue of steering, how does that work? Are there any overhead racing games out there that I could reference? Maybe a rotation, but that might not be the most realistic as I want the steering force to come from the front so it looks as good as it can.

So now we have a tractor that drives around, and I want to be able to attach a plow or something to it, no problem, physics joint. Or?

Then the real issue, is having it appear that the plow is working, and changing the color of the ground. I asked a while back about this, and was referred to having some kind of coordinate system. Couldn’t figure out how to implement that, so I thought of having about 1000 or more “tiles” that change color upon contact with the plow. That would take a ridiculous amount of time, but I would do it if I had to. My other thought would be drawing lines behind the plow, but not sure how to make it track in the turns and such.

If anyone can shed some light on this, I would love it. Even references to drawing skid marks on a racing game would help very very much!

Ryley Newsham [import]uid: 28237 topic_id: 34974 reply_id: 334974[/import]

Anyone? Having a really hard time getting the “steering” right, and having a smooth rotation [import]uid: 28237 topic_id: 34974 reply_id: 139472[/import]

Are trackers front wheel drive?

Anyway, I would think that you’d put a pretty heavy linearDamping on the tractor body and attach wheels to each corner. The drive wheels would have their linearVelocity changed by the Dpad. This way, with an appropriate joint between the drive wheels and the body, the wheels would actually push or pull the body and the body would exert the required force against them.

The DPad would control both the rotation (left/right on the DPad) of the wheels (applied by exerting angular force against the wheels, rather than just changing their .rotation value) and the amount of forward force (velocity) they have (up/down on the DPad.)

Changing the ground behind could be done by regularly putting down an image of changed ground, possibly with some masking to make it blend in with the ground beneath better - the more the image gets put down the more the ground looks churned. So it would be a few images which can be put down at random rotations to get variation.

That’s where I’d start anyway. Oh, the pivot joint between the steering wheels would need to be limited as well. How far can a tractor turn it’s steering wheels.

Of course, if the steering wheels are not the drive wheels you can use the same method, but you’d have to play with the linear damping on the steering wheels to get the to turn the tractor.

Would be very interested to see what you come up with. [import]uid: 8271 topic_id: 34974 reply_id: 139478[/import]

They can be 4-wheel drive, but usually rear wheel.

linearDamping on the body would provide a mass? From the docs, “The numerical value for how much the body’s linear motion is damped.” So that would give a weight to the “frame?”

Something I am struggling with is the rotation, as you say applying an angular force. If I was to use

object:applyAngularImpulse()  
object:applyForce()  

I would assume the second one is right, how would I apply an diagonal force? Really stumped here

Setting rotation limits, would object:setRotationLimits() work?
The “drive” wheels would work I believe, I already have a drive figured out, and can apply that to this method! Thank you!

As far as the ground, I never thought of using that method. Might actually work better, but still puzzled on how to apply this.

Thank you so much!
Ryley [import]uid: 28237 topic_id: 34974 reply_id: 139517[/import]

I would turn the wheels by using the pivot joint motor on the joint connecting them to the tractor body.

linearDamping would provide drag, not mass. The mass is calculated from the object area multiplied by the density.

If you want to see a basic example of drag, create a large rectangle, give it a physics body, set linearDamping to, say, 5 and use a touch joint to drag it around the screen. You’ll see it move as it it’s being dragged across the ground. [import]uid: 8271 topic_id: 34974 reply_id: 139560[/import]

[text]I would turn the wheels by using the pivot joint motor on the joint connecting them to the tractor body.[/text]

So you mean something like a separate motor besides from the wheels? I played around with pivot joints, and discovered how they and the motors work. I figured out how to propel the tractor forwards, but rotating the wheels is again where I fall short. I can set the rotation limits, but not sure what to do with them. I found another example, and it works great for what I am attempting to accomplish.

local onRightController = function (event)   
 if event.phase == "began" then  
 steeringAngle = MAX\_STEER\_ANGLE  
 elseif event.phase == "ended" then  
 steeringAngle = 0  
 end  
end  

So that makes sense to me, but this doesn’t

--Steering  
 local mspeed  
 mspeed = math.rad( steeringAngle - motor0Joint.jointAngle )  
 motor0Joint.motorSpeed = mspeed \* STEER\_SPEED  
  
 mspeed = math.rad( steeringAngle - motor1Joint.jointAngle )  
 motor1Joint.motorSpeed = mspeed \* STEER\_SPEED  

The math.rad is puzzling me, my math education is inadequate for this and my math semester starts in 2 weeks. I think I got it figured out what it is doing, but how it does it is puzzling. All I need is to be able to rotate it a maximum degrees, then it should pull the front end around!

As far as the dampening, I did what you said as well as another test and I now understand that, and can certainly see its use!

Thank you very much again, for taking time to help me. I do appreciate it!
Ryley [import]uid: 28237 topic_id: 34974 reply_id: 139571[/import]

Hmm. Could you post your whole tractor code? [import]uid: 8271 topic_id: 34974 reply_id: 139589[/import]

[code]
display.setStatusBar( display.HiddenStatusBar )

local physics

local TRACTOR_WIDTH = 40
local TRACTOR_HEIGHT = 75
local TRACTOR_SPEED = 15
local tractor

local motor0
local motor1
local motor2
local motor3

local motor0Joint
local motor1Joint
local motor2Joint
local motor3Joint

local STEER_SPEED = 200
local MAX_STEER_ANGLE = 30

local leftBtn = display.newRect( 10, 420, 50, 50)
leftBtn:setFillColor(200,100,0)
local rightBtn = display.newRect( 70, 420, 50, 50)

local createPhysics = function ()
physics = require( “physics” )
physics.start()
physics.setGravity(0,0)
physics.setDrawMode( “hybrid” )
physics.setVelocityIterations( 10 )
end

local createTractor = function()
tractor = display.newRect(0,0,40,75)
tractor.x = 320*.5 -20
tractor.y = 480-80
physics.addBody(tractor,“dynamic”,{density=3,friction=0,bounce=0.5})

tractor.linearDamping = 1
tractor.angularDamping = 3

motor0 = display.newRect(tractor.x-TRACTOR_WIDTH*0.5-3.5,tractor.y-TRACTOR_HEIGHT*0.5,7,14)
physics.addBody(motor0,dynamic,{density=0.1,friction=0,bounce=0})

motor1 = display.newRect(tractor.x+TRACTOR_WIDTH*0.5-3.5,tractor.y-TRACTOR_HEIGHT*0.5,7,14)
physics.addBody(motor1,dynamic,{density=0.1,friction=0,bounce=0})

motor2 = display.newRect(tractor.x-TRACTOR_WIDTH*0.5-3.5,tractor.y+TRACTOR_HEIGHT*0.5-14,7,14)
physics.addBody(motor2,dynamic,{density=0.1,friction=0,bounce=0})

motor3 = display.newRect(tractor.x+TRACTOR_WIDTH*0.5-3.5,tractor.y+TRACTOR_HEIGHT*0.5-14,7,14)
physics.addBody(motor3,dynamic,{density=0.1,friction=0,bounce=0})

motor0Joint = physics.newJoint( “pivot”, tractor, motor0, motor0.x,motor0.y )
motor1Joint = physics.newJoint( “pivot”, tractor, motor1, motor1.x,motor1.y )
motor2Joint = physics.newJoint( “pivot”, tractor, motor2, motor2.x,motor2.y )
motor3Joint = physics.newJoint( “pivot”, tractor, motor3, motor3.x,motor3.y )

motor0Joint.isMotorEnabled = true
motor0Joint.motorSpeed = 0
motor0Joint.maxMotorTorque = 100
motor0Joint.isLimitEnabled = true
motor0Joint:setRotationLimits(-30,30)

motor1Joint.isMotorEnabled = true
motor1Joint.motorSpeed = 0
motor1Joint.maxMotorTorque = 100
motor1Joint.isLimitEnabled = true
motor1Joint:setRotationLimits(-30,30)

motor2Joint.isLimitEnabled = true
motor2Joint:setRotationLimits(0,0)

motor3Joint.isLimitEnabled = true
motor3Joint:setRotationLimits(0,0)

motor0.isSensor = true
motor1.isSensor = true
motor2.isSensor = true
motor3.isSensor = true

end

local bodySpeedX
local bodySpeedY

local bodySideWayX
local bodySideWayY

–[[local killOrthogonalVelocity = function(body)

bodySpeedX,bodySpeedY = body:getLinearVelocity()

bodySideWayX = math.sin(body.rotation/180*math.pi)
bodySideWayY = math.cos(body.rotation/180*math.pi)

– multipyl with dot(,)
bodySideWayX = bodySideWayX * (bodySideWayXbodySpeedX + bodySpeedYbodySideWayY)
lbodySideWayY = bodySideWayY * (bodySideWayXbodySpeedX + bodySpeedYbodySideWayY)

body:setLinearVelocity(bodySideWayX,bodySideWayY)
end]]–


local wheelDirectionX
local wheelDirectionY

local steeringAngle = 0

local render = function (e)

--[[killOrthogonalVelocity(motor0)
killOrthogonalVelocity(motor1)
killOrthogonalVelocity(motor2)
killOrthogonalVelocity(motor3)]]–

--Driving
wheelLDirectionX = math.sin(motor0.rotation/180math.pi) * TRACTOR_SPEED
wheelLDirectionY = math.cos(motor0.rotation/180
math.pi) * TRACTOR_SPEED

wheelRDirectionX = math.sin(motor1.rotation/180math.pi) * TRACTOR_SPEED
wheelRDirectionY = math.cos(motor1.rotation/180
math.pi) * TRACTOR_SPEED

motor0:applyForce(wheelLDirectionX,-wheelLDirectionY,motor0.x,motor0.y)
motor1:applyForce(wheelRDirectionX,-wheelRDirectionY,motor1.x,motor1.y)

--Steering
local mspeed
mspeed = math.rad( steeringAngle - motor0Joint.jointAngle )
motor0Joint.motorSpeed = mspeed * STEER_SPEED

mspeed = math.rad( steeringAngle - motor1Joint.jointAngle )
motor1Joint.motorSpeed = mspeed * STEER_SPEED

end

local onRightController = function (event)
if event.phase == “began” then
steeringAngle = MAX_STEER_ANGLE
elseif event.phase == “ended” then
steeringAngle = 0
end
end

local onLeftController = function (event)
if event.phase == “began” then
steeringAngle = -MAX_STEER_ANGLE
elseif event.phase == “ended” then
steeringAngle = 0
end
end

local start = function()
Runtime:addEventListener( “enterFrame”, render )

leftBtn:addEventListener(“touch”, onLeftController)
rightBtn:addEventListener(“touch”, onRightController)
end

createPhysics()
createTractor()
start()
[/code]

I found this elsewhere and edited it to my liking, it handled terrible at first but now it is much better. If you copy and paste this, it should work as is.

It works great! But I would like to know why it works. Lines 125-140 are very puzzling to me, I understand what it is asking, but why the math is all there and how it is called makes me interested, perhaps you could elaborate?

Other than that, this pretty much solves all my issues. Next I have to control acceleration with buttons, which shouldn’t be too hard. After that set perimeter of the “field” as well as attach a camera to the tractor.

Using this, I plan on passing it parameters to change wether it is a combine, or what it is. That would make it very universal.

As far as the “plowing” I looked into the masking. I think (correct me if I’m wrong) that I can “tow” something behind the tractor, and have that unmask an image as it goes? Could I use event.contact for this? Not too sure, I could get it eventually I think!

Thank you again :slight_smile:
Ryley [import]uid: 28237 topic_id: 34974 reply_id: 139635[/import]

As far as masking goes, I think you don’t need to set a mask - just use an image which looks like churned up mud, but with some transparency to make it look right when it is added on top of the rest of the ground.

Here’s my understanding of the following lines (maths is not my forte, either)…

Calculate the amount of force to apply to the powered wheels needed to drive the vehicle. This is based on the current direction of the wheel with the motor and the speed the vehicle is currently moving. The actual maths is a form of rotation maths (the 180/pi gives it away.) In short, this works out which direction the force is applied to the drive wheels.
[lua] wheelRDirectionX = math.sin(motor1.rotation/180*math.pi) * TRACTOR_SPEED
wheelRDirectionY = math.cos(motor1.rotation/180*math.pi) * TRACTOR_SPEED
[/lua]

This takes the force (calculated above) and applies it to the wheels to drive the tractor. This is basically the simulation of the engine providing power to the wheels. In fact, what it is really doing is pushing the wheel objects in the direction they should be moving. Because the wheels are attached to the rest of the tractor they will cause the tractor to look like it’s driving in that direction.
[lua] motor0:applyForce(wheelLDirectionX,-wheelLDirectionY,motor0.x,motor0.y)
motor1:applyForce(wheelRDirectionX,-wheelRDirectionY,motor1.x,motor1.y)
[/lua]

This applies rotational (angular) force to the pivoted object connected at the joint. In effect, this simply turns the wheels by applying force to the pivot joint.
[lua] --Steering
local mspeed
mspeed = math.rad( steeringAngle - motor0Joint.jointAngle )
motor0Joint.motorSpeed = mspeed * STEER_SPEED

mspeed = math.rad( steeringAngle - motor1Joint.jointAngle )
motor1Joint.motorSpeed = mspeed * STEER_SPEED[/lua]

So, all in all, we have 3 bits of code: The first works out how much force should be applied in the direction the tractor is driving. The second applies the force to the wheels, causing the tractor to move. The third turns the wheels, if they are being steered. [import]uid: 8271 topic_id: 34974 reply_id: 139649[/import]

I’m glad this topic: https://developer.coronalabs.com/forum/2011/06/22/top-view-car-simulation-experiment helped you :slight_smile:

[import]uid: 5629 topic_id: 34974 reply_id: 139654[/import]

@ yagizgurgul Yes thank you! Couldn’t find it for the longest time, but it sure helps man.

I think I got that figured out now, did some calculating on my end and mostly figured it out with your help. Thank you very much! Now what I am working on is having the tractor drive with a button command, see what I can do! Thank you both for so much of your help in this department

Lastly, the masking. I understand what you are saying, but as far as getting it to display as the “plow” goes over it, not the whole thing changing is a bit puzzling!

Thank you once again! [import]uid: 28237 topic_id: 34974 reply_id: 139732[/import]

I think the “plowed” image of mud should be added underneath the tractor, then revealed as the tractor drives away. [import]uid: 8271 topic_id: 34974 reply_id: 139734[/import]

Ill look into that, thank you for all of your help! [import]uid: 28237 topic_id: 34974 reply_id: 139918[/import]

Anyone? Having a really hard time getting the “steering” right, and having a smooth rotation [import]uid: 28237 topic_id: 34974 reply_id: 139472[/import]

Are trackers front wheel drive?

Anyway, I would think that you’d put a pretty heavy linearDamping on the tractor body and attach wheels to each corner. The drive wheels would have their linearVelocity changed by the Dpad. This way, with an appropriate joint between the drive wheels and the body, the wheels would actually push or pull the body and the body would exert the required force against them.

The DPad would control both the rotation (left/right on the DPad) of the wheels (applied by exerting angular force against the wheels, rather than just changing their .rotation value) and the amount of forward force (velocity) they have (up/down on the DPad.)

Changing the ground behind could be done by regularly putting down an image of changed ground, possibly with some masking to make it blend in with the ground beneath better - the more the image gets put down the more the ground looks churned. So it would be a few images which can be put down at random rotations to get variation.

That’s where I’d start anyway. Oh, the pivot joint between the steering wheels would need to be limited as well. How far can a tractor turn it’s steering wheels.

Of course, if the steering wheels are not the drive wheels you can use the same method, but you’d have to play with the linear damping on the steering wheels to get the to turn the tractor.

Would be very interested to see what you come up with. [import]uid: 8271 topic_id: 34974 reply_id: 139478[/import]

They can be 4-wheel drive, but usually rear wheel.

linearDamping on the body would provide a mass? From the docs, “The numerical value for how much the body’s linear motion is damped.” So that would give a weight to the “frame?”

Something I am struggling with is the rotation, as you say applying an angular force. If I was to use

object:applyAngularImpulse()  
object:applyForce()  

I would assume the second one is right, how would I apply an diagonal force? Really stumped here

Setting rotation limits, would object:setRotationLimits() work?
The “drive” wheels would work I believe, I already have a drive figured out, and can apply that to this method! Thank you!

As far as the ground, I never thought of using that method. Might actually work better, but still puzzled on how to apply this.

Thank you so much!
Ryley [import]uid: 28237 topic_id: 34974 reply_id: 139517[/import]

I would turn the wheels by using the pivot joint motor on the joint connecting them to the tractor body.

linearDamping would provide drag, not mass. The mass is calculated from the object area multiplied by the density.

If you want to see a basic example of drag, create a large rectangle, give it a physics body, set linearDamping to, say, 5 and use a touch joint to drag it around the screen. You’ll see it move as it it’s being dragged across the ground. [import]uid: 8271 topic_id: 34974 reply_id: 139560[/import]

[text]I would turn the wheels by using the pivot joint motor on the joint connecting them to the tractor body.[/text]

So you mean something like a separate motor besides from the wheels? I played around with pivot joints, and discovered how they and the motors work. I figured out how to propel the tractor forwards, but rotating the wheels is again where I fall short. I can set the rotation limits, but not sure what to do with them. I found another example, and it works great for what I am attempting to accomplish.

local onRightController = function (event)   
 if event.phase == "began" then  
 steeringAngle = MAX\_STEER\_ANGLE  
 elseif event.phase == "ended" then  
 steeringAngle = 0  
 end  
end  

So that makes sense to me, but this doesn’t

--Steering  
 local mspeed  
 mspeed = math.rad( steeringAngle - motor0Joint.jointAngle )  
 motor0Joint.motorSpeed = mspeed \* STEER\_SPEED  
  
 mspeed = math.rad( steeringAngle - motor1Joint.jointAngle )  
 motor1Joint.motorSpeed = mspeed \* STEER\_SPEED  

The math.rad is puzzling me, my math education is inadequate for this and my math semester starts in 2 weeks. I think I got it figured out what it is doing, but how it does it is puzzling. All I need is to be able to rotate it a maximum degrees, then it should pull the front end around!

As far as the dampening, I did what you said as well as another test and I now understand that, and can certainly see its use!

Thank you very much again, for taking time to help me. I do appreciate it!
Ryley [import]uid: 28237 topic_id: 34974 reply_id: 139571[/import]

Hmm. Could you post your whole tractor code? [import]uid: 8271 topic_id: 34974 reply_id: 139589[/import]

[code]
display.setStatusBar( display.HiddenStatusBar )

local physics

local TRACTOR_WIDTH = 40
local TRACTOR_HEIGHT = 75
local TRACTOR_SPEED = 15
local tractor

local motor0
local motor1
local motor2
local motor3

local motor0Joint
local motor1Joint
local motor2Joint
local motor3Joint

local STEER_SPEED = 200
local MAX_STEER_ANGLE = 30

local leftBtn = display.newRect( 10, 420, 50, 50)
leftBtn:setFillColor(200,100,0)
local rightBtn = display.newRect( 70, 420, 50, 50)

local createPhysics = function ()
physics = require( “physics” )
physics.start()
physics.setGravity(0,0)
physics.setDrawMode( “hybrid” )
physics.setVelocityIterations( 10 )
end

local createTractor = function()
tractor = display.newRect(0,0,40,75)
tractor.x = 320*.5 -20
tractor.y = 480-80
physics.addBody(tractor,“dynamic”,{density=3,friction=0,bounce=0.5})

tractor.linearDamping = 1
tractor.angularDamping = 3

motor0 = display.newRect(tractor.x-TRACTOR_WIDTH*0.5-3.5,tractor.y-TRACTOR_HEIGHT*0.5,7,14)
physics.addBody(motor0,dynamic,{density=0.1,friction=0,bounce=0})

motor1 = display.newRect(tractor.x+TRACTOR_WIDTH*0.5-3.5,tractor.y-TRACTOR_HEIGHT*0.5,7,14)
physics.addBody(motor1,dynamic,{density=0.1,friction=0,bounce=0})

motor2 = display.newRect(tractor.x-TRACTOR_WIDTH*0.5-3.5,tractor.y+TRACTOR_HEIGHT*0.5-14,7,14)
physics.addBody(motor2,dynamic,{density=0.1,friction=0,bounce=0})

motor3 = display.newRect(tractor.x+TRACTOR_WIDTH*0.5-3.5,tractor.y+TRACTOR_HEIGHT*0.5-14,7,14)
physics.addBody(motor3,dynamic,{density=0.1,friction=0,bounce=0})

motor0Joint = physics.newJoint( “pivot”, tractor, motor0, motor0.x,motor0.y )
motor1Joint = physics.newJoint( “pivot”, tractor, motor1, motor1.x,motor1.y )
motor2Joint = physics.newJoint( “pivot”, tractor, motor2, motor2.x,motor2.y )
motor3Joint = physics.newJoint( “pivot”, tractor, motor3, motor3.x,motor3.y )

motor0Joint.isMotorEnabled = true
motor0Joint.motorSpeed = 0
motor0Joint.maxMotorTorque = 100
motor0Joint.isLimitEnabled = true
motor0Joint:setRotationLimits(-30,30)

motor1Joint.isMotorEnabled = true
motor1Joint.motorSpeed = 0
motor1Joint.maxMotorTorque = 100
motor1Joint.isLimitEnabled = true
motor1Joint:setRotationLimits(-30,30)

motor2Joint.isLimitEnabled = true
motor2Joint:setRotationLimits(0,0)

motor3Joint.isLimitEnabled = true
motor3Joint:setRotationLimits(0,0)

motor0.isSensor = true
motor1.isSensor = true
motor2.isSensor = true
motor3.isSensor = true

end

local bodySpeedX
local bodySpeedY

local bodySideWayX
local bodySideWayY

–[[local killOrthogonalVelocity = function(body)

bodySpeedX,bodySpeedY = body:getLinearVelocity()

bodySideWayX = math.sin(body.rotation/180*math.pi)
bodySideWayY = math.cos(body.rotation/180*math.pi)

– multipyl with dot(,)
bodySideWayX = bodySideWayX * (bodySideWayXbodySpeedX + bodySpeedYbodySideWayY)
lbodySideWayY = bodySideWayY * (bodySideWayXbodySpeedX + bodySpeedYbodySideWayY)

body:setLinearVelocity(bodySideWayX,bodySideWayY)
end]]–


local wheelDirectionX
local wheelDirectionY

local steeringAngle = 0

local render = function (e)

--[[killOrthogonalVelocity(motor0)
killOrthogonalVelocity(motor1)
killOrthogonalVelocity(motor2)
killOrthogonalVelocity(motor3)]]–

--Driving
wheelLDirectionX = math.sin(motor0.rotation/180math.pi) * TRACTOR_SPEED
wheelLDirectionY = math.cos(motor0.rotation/180
math.pi) * TRACTOR_SPEED

wheelRDirectionX = math.sin(motor1.rotation/180math.pi) * TRACTOR_SPEED
wheelRDirectionY = math.cos(motor1.rotation/180
math.pi) * TRACTOR_SPEED

motor0:applyForce(wheelLDirectionX,-wheelLDirectionY,motor0.x,motor0.y)
motor1:applyForce(wheelRDirectionX,-wheelRDirectionY,motor1.x,motor1.y)

--Steering
local mspeed
mspeed = math.rad( steeringAngle - motor0Joint.jointAngle )
motor0Joint.motorSpeed = mspeed * STEER_SPEED

mspeed = math.rad( steeringAngle - motor1Joint.jointAngle )
motor1Joint.motorSpeed = mspeed * STEER_SPEED

end

local onRightController = function (event)
if event.phase == “began” then
steeringAngle = MAX_STEER_ANGLE
elseif event.phase == “ended” then
steeringAngle = 0
end
end

local onLeftController = function (event)
if event.phase == “began” then
steeringAngle = -MAX_STEER_ANGLE
elseif event.phase == “ended” then
steeringAngle = 0
end
end

local start = function()
Runtime:addEventListener( “enterFrame”, render )

leftBtn:addEventListener(“touch”, onLeftController)
rightBtn:addEventListener(“touch”, onRightController)
end

createPhysics()
createTractor()
start()
[/code]

I found this elsewhere and edited it to my liking, it handled terrible at first but now it is much better. If you copy and paste this, it should work as is.

It works great! But I would like to know why it works. Lines 125-140 are very puzzling to me, I understand what it is asking, but why the math is all there and how it is called makes me interested, perhaps you could elaborate?

Other than that, this pretty much solves all my issues. Next I have to control acceleration with buttons, which shouldn’t be too hard. After that set perimeter of the “field” as well as attach a camera to the tractor.

Using this, I plan on passing it parameters to change wether it is a combine, or what it is. That would make it very universal.

As far as the “plowing” I looked into the masking. I think (correct me if I’m wrong) that I can “tow” something behind the tractor, and have that unmask an image as it goes? Could I use event.contact for this? Not too sure, I could get it eventually I think!

Thank you again :slight_smile:
Ryley [import]uid: 28237 topic_id: 34974 reply_id: 139635[/import]