Hi all, picked up AppGameKit studio a couple of months ago, so not totally used to ii all yet.
I'm making a fun 3D bus driver game with my daughter, but having a few problems with collision detection on the Z axis with simple AI traveling in the opposite direction.
The AI bus is supposed to honk its horn and wave when it gets near. I'm using this to move the AI repeatedly along the Z axis of my plane (when it gets to the bottom of the plane it resets and repeats its journey)
for i=0 to 1
if getObjectZ(busmesh2) < 1 then setobjectposition (busmesh2,15,2,1024)
so far so good. I'm traveling on the opposite side of the road in the opposite direction when they meet on the Z I'm using
if getobjectZ(busmesh0) = getobjectZ(busmesh2) then playsound(honkHorn,100,0,1)
It doesn't trigger the horn. Interestingly as a check, I used >= and it triggers, but loops and never stops (which makes sense).
Question is, what am I doing wrong with my Z collision? (please note bus is just passing by, not crashing into me).
Thanks in advance for any kind help.
Sorry I seem to have messed up the code snippet. [Fixed by Moderator