What's wrong with my collisions?

Blitz3D Forums/Blitz3D Beginners Area/What's wrong with my collisions?

IKG(Posted 2006) [#1]
Here's a chunk out of my program. I set up collisions like usual, but they aren't working for some reason. Is everything fine here? If so then I'll know if it's something else in the program.

player_col=1
world_col=2
guy_col=3

guy = LoadMesh("guy.b3d")
ScaleMesh guy,0.01,0.01,0.01

level = LoadMesh("level.b3d")
ScaleMesh level,0.01,0.01,0.01
PositionEntity level,0,2,0

;camera stuff
cam=CreateCamera()
CameraRange cam,1,10000
CameraZoom cam,1.4
RotateEntity cam,45,0,0
MoveEntity cam,0,0,-1000
PositionEntity cam,3,4,3

MoveMouse GraphicsWidth()/2,GraphicsHeight()/2

mousespeed#=0.2
cameraspeed#=10
camerasmoothness#=4

;collision stuff
Collisions player_col, world_col,2,3
Collisions player_col, guy_col, 2, 3
Collisions guy_col, world_col, 2, 3
EntityType cam, player_col
EntityType level, world_col
EntityType guy, guy_col



WolRon(Posted 2006) [#2]
Looks fine to me I guess. I would probably set my EntityTypes before setting up Collisions, but AFAIK, it doesn't have to be.


Shambler(Posted 2006) [#3]
You have the UpdateWorld() funtion in you main look I hope?


Ross C(Posted 2006) [#4]
Try using Updateworld with no brackets just in case. I don't know the difference, i always use no brackets tho. Wolron might be right about setting up collisions AFTER you set your entitytypes.


big10p(Posted 2006) [#5]
I think you need to set the collision radius of your meshes.

It looks like you're scaling your meshes very small. I can't tell for sure as your meshes might be huge to begin with. The default collision radius is 1 (I think) which will be too big if you've scaled your meshes right down.


IKG(Posted 2006) [#6]
It works now :)

I forgot to add UpdateWorld()

And the reason why I have to scale them so much is because 3DWS' scale is freaking huge.