Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 07:28:29 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Box2d :What is the best approach to build static Box2d smooth curve line
Pages: [1]
Print
Author Topic: Box2d :What is the best approach to build static Box2d smooth curve line  (Read 763 times)
umen
Level 0
**


View Profile
« on: February 24, 2015, 11:29:05 PM »

i want to know what is the best approach to simulate smooth curved line as static body it will be like path for car to drive .
something like this : 
http://www.freeriderhd.com/ 

how does its box2d static body are constructed ?
Thanks
Logged
Zaphos
Level 5
*****



View Profile WWW
« Reply #1 on: February 24, 2015, 11:58:00 PM »

Probably just approximate the smooth curve with ChainShape line segments; see 4.6 of http://www.box2d.org/manual.html#_Toc258082970
Logged

How to Be a Tree | Voro | Realistic Kissing Simulator | twitter | Programmer at Epic Games
AxezDNyde
Level 0
**


View Profile
« Reply #2 on: March 05, 2015, 12:28:37 AM »

Checkout this tutorial for problems you might encounter using EdgeShapes: iforce2d tutorial
Logged

Axez, Grant Ed.
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic