Jump to content

implementing a car


diedir
 Share

Recommended Posts

Hi all

 

i am trying to make a car working like the monstertruck (for the moment)

 

but i don't know exactly how i can show up tires

because, i copied the monstertruck script with no luck

 

thanks for helping

AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11

Link to comment
Share on other sites

As the physical tires of the car are just invisible raycasts you have to position the tire mesh at the same position and roatation as the tires.

 

Try something like:

SetEntityMatrix(VisibleTireMesh, GetEntityMatrix (RaycastTire));

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

thank you but where can i put that in the lua script ?

an error occurs when i put the line in."Exception violation...." and editor shuts down.

 

anyway an error occured when i "play" the monstertruck script even if the model shows up fine in editor....

 

"table index is nil"

and the line :

"classtable[modelreference]=class" is pointed

 

weird code there, loose my mind in it...

 

my car has no physic hull (for the moment), perhaps it is the problem...

AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11

Link to comment
Share on other sites

ok thanks macklebee for that precision.

i didn't made a difference before that.

 

if someone could describe the complete method for implementing

a simple car :

naming convention ?

dummy pivot placing ?

 

if it has something special to see...

because just giving the gmf created is not very formative...

AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11

Link to comment
Share on other sites

np, as long as you are using the code from the monstertruck script, you just need to fix the line that uses the lowercase "clamp" function... it should be "Clamp"... and also just make sure you have all of your models being loaded in the script for the tires... then just use a modified version of the driver.lua that loads your vehicle gmf... you might have to change which tires control the steering though in the driver.lua... the monstertruck script has the tires in a different order than the viperscout script...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

No problems diedir hope something is of help to you.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

well, i created hull phy files with my car and the 4 wheels apart,

 

did mycar.lua and put the modified code found in the 1st link => no luck

 

tried with the monster_truck modified lua => with no luck too

 

tried modified driver_truck.lua in scripts/game and => crashed "Window access violation" when ctrl+g

 

will retry tomorrow, tired now...

 

EDIT:

 

still not working at the moment... :(

Edited by diedir

AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11

Link to comment
Share on other sites

last news

 

i think that all my trouble is due to car hierarchy

that is not well transfered via object to gmf,

i must pass via fbx or dae file to keep the hierarchy or the pivot car.

well, i must digg in all that....

 

EDIT:

 

Great news : it works :D:)

thanks to macklebee and marley ghost for their code help

 

the problem was the model in obj which don't keep hierarchy with it to gmf !

 

trying the max to gmf export after parenting in max, worked !

we need a LE tool to do this outside max, please !

i can't afford a max license

Edited by diedir

AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...