Open umdreamer opened 1 year ago
I have some information that might help,
Looks like you are trying to make sure the vehicle is on the ground. I am not familiar with useGravity
, but I know how to set a waypoint that is on the ground by using raycast
state = lgsvl.AgentState()
state.transform = transform
hit = sim.raycast(state.position, lgsvl.Vector(0, -1, 0), layer_mask)
state.transform.position = hit.point
return state
https://github.com/lgsvl/simulator/issues/1802 this issue might be helpful.
The NPC gets through the house wall and floats in the air until it gets down the ground. I have add NPCWaypointBehaviour.cs at line 101 to add
rb.useGravity = true
to get Gravity, but it doesn't work. The waypoints are from ground then to the house roof, and then to the ground. It looks that the NPC just follow the line between two waypoints ignoring any obstacles in on the way.Any helps?