0 Replies Latest reply on Apr 28, 2006 6:47 PM by Scifo

    If you've got a bit of time can you read this and help me out

      I'm sending this email to my lecturer, but he might not get it at the weekend. The hand in is on Friday and I need to get things moving by them.

      Any help appreciated


      I emailed you earlier today say that I may need help with trying to apply the remote control car scenario to a similar scene of my own.
      I’ve been working on it all day, but there are two problems which I’m having difficulty understanding.

      Essentially I have stripped the car demo down to its most basic parts. First I left the wheels working as they would normally, then I tried removing them altogether so I could have a proper understanding of how the car is driven.

      I’ve placed links to my website for the five relevant files for this email at the bottom, where I’ve explained each of them a little.
      The first relevant file is located here at

      When I applied these changes I was able to have the car moving along the ground with a reasonable effect, so my next step was to import a scene of my own.
      For simplification I have just used two rectangular objects in my scene; one for the car “chassis00” and one for the ground “floor”. I have also kept in the objects representing the four wheels, but for the time being I am not using them.

      In order to have my floor placed directly beneath the car I have had to edit its position on the Z-axis and increase it size. I’m not altogether sure why I have had to do this because I would assume that in the 3D file used to create this, the floor would have been placed in a similar position to mine
      The code I’ve placed for this in the update hover is:

      pMember.model("floor").transform.position = vector( 2.40471e3, 768.6797, -181.3870 )
      pMember.model("floor").transform.scale = vector( 30, 30, 1 )

      I have two problems now though and this isn’t one of them

      My first problem is not as apparent here in this current model as it was in some earlier versions I’ve worked on, but it is still there. If you move my object “chassis00” around the plane for a short while, towards the edge but not over it, it will eventually flip in the air.
      The fact that flips so high is my second problem and I’ll go into that soon but there is another effect going on here.
      It appears to me that as my chassis is moved along the ground there is a downward force being applied to it that is gradually pushing it into the ground until it gets to the stage where it recognises the ground in front of it as being a wall and it then flips away in response to having met a wall even though there are no walls in this scene.
      When I carry out the same test of moving the car along the ground using the original cast member, I don’t get this response until I’ve hit my car into an actual wall or object.

      My second problem at the moment, I touched on in the first part, is the over the top reaction whenever a “chassis00” hits an object in either the original cast member or my dummy version, where the car flips wildly into the air when I hit something.
      Unlike the first problem though I can see the general area of where I’ve made my mistake.

      In order to use an object that currently doesn’t have any wheels, I’ve deleted a lot of the code in the “raycast car” behaviour code. I have effectively taken out any reference to the wheels themselves and replaced it where needed with code I thought should apply the same response.
      The most damaging aspect of this that I can see is that in the area “repeat with i = 1 to pWheelPointList.count” where they have repeated a process to search for models under ray of each wheel and then apply the required point velocity to the four corners of the car where the four wheels are. Here, rather than repeat the process four times I have wanted to just apply a modelsunderray to the chassis of the car to find the “floor” and then apply the required force to the centre of the car(pChassisRB.applyForce(force)
      ) rather than the four points (pChassisRB.applyForceAtPoint(force, pWheelPointList ))

      In order to compensate for the fact that there is now only one rather than four forces at work, I have multiplied the equation that produces the force by four.
      Firstly though, I’m not completely sure why I have to do this. I haven’t figured out how the force that they are applying is only a quarter of what is required (*4)
      Secondly, this still doesn’t completely work. This approach means that the car does hover above the ground, but whenever I hit something, things go badly wrong and the car flips wildly in the air rather than it’s usual bounce.

      I apologise for the length of this email (and if it’s not too coherent, because I’m writing it fairly late at night), but as I mentioned I’ve spent several days stuck on these problems and if you could take the time to help point me in the right direction with them I could get our project moving again properly.
      I’m reasonably confident that after I understand what the problems are here that the rest of the project will piece together quite smoothly.


      The files related to this email are located at my newry portal website:

      “Dummy Layout”
      Relates to problem 1: When the car moves along the floor for a short while it will eventually flip out as though it has hit a wall

      “Dummy Version – Max File”
      Relates to problem 1: The 3DS Max file that includes the basic objects used in the Dummy Layout’s 3D member.

      “Original Scene – Without Wheels(1)”
      Relates to problem 1: In this version as long as the car is moved only on the floor it hovers as normal
      Also relates to problem 2: Whenever it hit’s a wall it flips wildly

      “Original Scene – With Wheels”
      Relates to problem 2: A stripped down version of the remote control car demo. Some non-vital parts of the “raycast car” behaviour have been removed such as the turning effects on the wheels.

      “Original Scene – Without Wheels(2)”
      This is a working version of the demo with the wheels removed. It’s not a lot different to the ‘with wheels file’, but it shows that removing the wheels is possible. My problem is though that I want to remove all of the code relating to the wheels so I can focus on making the car work.