Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
WIP car physics

Guest
Guest
Quote
2023-05-11 15:20:29

at now car can smooth "rotate" on any ground mesh
🔎︎



Guest
Guest
Quote
2023-05-11 18:32:49

sorry, use wrong image link
🔎︎



sven
Registered User
Quote
2023-05-11 19:14:24

Looks good.. very useful for tank battle games.


okeoke
Registered User
Quote
2023-05-11 19:25:44

Are you using mesh normals? Or multiple raycast with offset on x and z?:)


Guest
Guest
Quote
2023-05-11 21:02:01

i use 4 "ray" (you can see 4 plane) and check height difference for rotate node by x and z


andgameplay
Registered User
Quote
2023-05-12 18:10:12

Very intersting! How you made this? Did you sed variables? Did you used javascript? Great job!


Guest
Guest
Quote
2023-05-12 18:33:08

andgameplay all made with js


Guest
Guest
Quote
2023-05-12 18:44:27

"How you made this?"
i've use 4 plane on sides and they work like point for ray down with ccbGetCollisionPointOfWorldWithLine and when get collision in this point i use difference between them as rotation


Guest
Guest
Quote
2023-05-12 18:58:09

andgameplay
this 4 planes can be introduced as wheel, like front-left (fl), front-right(fr) and back-left(bl), back-right(br). Then we can define rotation by x axis (incline to front and back) is difference between front and back height " (bl.y + br.y) - (fl.y + fr.y) = xAxis " and rotation by z axis (incline to left and right) is difference between left and right " (fr.y + br.y) - (fl.y + bl.y) = zAxis ", if you need it as code i can post it later


andgameplay
Registered User
Quote
2023-05-14 18:30:44

Great! It's very good, because simulate much better the irregularity of the ground! I like to developer car racing games, but they always have simple physics controls.

I'm very thankful if you could share this code, really thanks :)


eoh
Guest
Quote
2023-05-14 19:05:02

@andgameplay sven just posted a similar free behavior script at https://www.ambiera.com/forum.php?t=11543

cheers!


eoh
Guest
Quote
2023-05-14 19:13:10

looks nice this kind of programing is hard in my opinion


Guest
Guest
Quote
2023-05-15 16:34:03

andgameplay sven made almost same code so you can use it)))
https://5v3n.itch.io/coppercube-...


Guest
Guest
Quote
2023-05-15 18:41:34

eoh sorry didn't see your wrote so yes you right


andgameplay
Registered User
Quote
2023-05-16 01:22:32

Yes, I'm using the Sven code, the both is great! Thanks!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact