No collisions
Blitz3D Forums/Blitz3D Programming/No collisions
| ||
Hi there, I created an object with 3DS Max (a parking lot), which contains a gate, which I want to move when my vehicle comes close to it. I used the B3D pipeline exporter for Max and checked the "Add scene root". When I load my parking lot like this: Global ParkingLot=LoadAnimMesh("ParkingLot.b3d") EntityType ParkingLot, SCENE ScaleEntity ParkingLot, 0.25, 0.25, 0.25 PositionEntity ParkingLot, -100, 0.15, -50 I have no collisions (as I can drive through the sides of the parking lot). If I load the object with LoadMesh, then I collide with the parking lot as expected. Also when I loaded the object with LoadAnimMesh, while the "Add scene root" wasn't checked in Max, I couldn't scale the object (and collisions didn't work either). I tried to assign an entity-type to the children, but it gave me "Memory access violation". How can I do this? Do I have to load the parking lot and the gate separately (create 2 separate objects in Max) or can this be done otherwise? Oh yes, the collisions are Sphere-to-Polygon. I use a collision radius for my vehicle. Collisions CARBODY, SCENE, 2, 3 I also tried to assign an entitybox (collision box) to the parking lot, but it didn't work either. |
| ||
I found it! To get the handle of the children, I used GetChild instead of FindChild. Now I assigned an entity-type to my gate and it works. I just collided with it. Sorry for any inconvenience. I found it when using RotateEntity on the gate. This gave me a "Memory access violation too". Then I printed the handle on the screen and it was 0. |