collision mav
Blitz3D Forums/Blitz3D Beginners Area/collision mav
| ||
Hey guys, so every time i press run this gets a MAV unless i take collisions out. This doesn't make sense everything else is good |
| ||
It's likely that LoadMesh("GFX\room.b3d") failed for some reason. When run from the IDE the current directory is set to a \tmp folder. Try using the full path to room.b3d rather than the relative path GFX\. Memory Access Violation is a catch-all "something went wrong" message. If you enable Debug mode, at the bottom of the Program menu, you will usually get more useful information. |
| ||
if one of your surface has more than 32000vertices or 32000 triangles, this will produce a MAV (on some computers) in any case it is always better to use low details collidables (obstacles) |
| ||
@LikeToMakeGames>>after a quick reading, i see these potential errors :EntityType room1,map_col,2 ;should be EntityType room1,map_col EntityType collider,collider_col,1 ; should be EntityType collider,collider_col Collisions collider_col,room1,3,1 ;should be Collisions collider_col,map_col,2,1 ;ellipsoid to mesh, response stop additionally, i suggest to set the collisions (entitytype, collisions) after you have positionned all your entities in the world, to prevent them of being stuck somewhere (because of collisions) here is a similar scene with collisions ellipsoid->mesh (room) : |
| ||
If you're getting a MAV then you're either running the compiler in release mode or whatever you're loading is corrupt and the internal loading function can't handle it as a result. You should run test builds in debug mode so that you get useful feedback from the debugger. Most of the loader functions such as LoadMesh will return a zero if the resource you're trying to load doesn't load for some reason. You should check for a zero result and quit with an error message if the resource doesn't load (for release versions you may need more elegant ways of handling non-essential resources that won't load). eg. Global room1 = LoadMesh("GFX\room.b3d") If room1 = 0 Then RuntimeError "ERROR: Failed to load 'GFX\room.b3d'." If you upload the 'room.b3d' file along with any other required media and post a link then we can give you more useful info on the problem. |
| ||
This happens still even if i use a cube entity |
| ||
the code example i posted (in post #4) works well here without any MAV... Maybe a problem with your mesh ? (more than 32000vertices or/and more than 32000triangles in a surface ?) |
| ||
Put on debug mode and find out what the error message is... a mav by itself is rather meaningless....debug mode will show the exact location of the error (unless it is what RemiD says at which case it will MAV on renderworld) |
| ||
Thanks guys I figured it out by the way I put it like Collisions collider_col,room1,2,2 when it should have been Collisions collider_col,map_col,2,2 |