Game Development Community

Collision Ain't Happenin'

by rennie moffat · in Torque Game Builder · 11/12/2009 (1:52 pm) · 11 replies

Hi Guys,
I built a pong like game and my collisions are not happening. Let me say they were, my ball was bouncing everything clicking, tho i changed my image map from a white rectangle to a basketball and adjusted my collision points accordingly. Then I pressed play and the basket ball, no matter what I play with in the editor, does not seem to want to recognize its first wall. Any common errors here?

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
11/12/2009 (2:20 pm)
My Apologies. For some reason, when I posted this, I thought it was okay to have "receive physics" off.



#2
11/12/2009 (2:25 pm)
I did however set my collision detection mode to circle and edited my collision points to about a 24 so they even make for a rough circle.

What is wrong here please? Info helpful.
#3
11/12/2009 (2:27 pm)
its ok, just adjusted my collision scale, it shrunk the gap. not sure if it is reading like an actual circle yet tho. will see.
#4
11/12/2009 (2:31 pm)
It is definitely not spinning (rotating) when it hits a wall. "it" is a ball.
#5
11/12/2009 (2:44 pm)
also, my ball is neither rotating nor acting randomly on release. It always shoots at the same angle, speed and the same rotation (none).


function ballProperties::releaseBall(%this, %val)
{
	if(%val = 1)
	{
	%direction =getRandom(%this.MinAngle * 1000, %this.maxAngle * 1000);
	%speed = getRandom(%this.minSpeed * 1000, %this.maxSpeed *& 1000);
	%this.owner.setLinearVelocityPolar(%direction * 0.001, %speed * 0.001);
	
	%rotation = getRandom(%this.minRotationSpeed * 1000, %this.maxRotationSpeed * 1000);
	%this.owner.setAngularVelocity(%rotation * 1000)	
	}
}
#6
11/12/2009 (4:11 pm)
Ok,
so I have used this to get my guy moving from my key bind trigger.
%this.owner.setAngularVelocity(%this.velocityX);
	%this.owner.setImpulseForce(%this.velocityX, %this.velocityY, false);



as such he fires on an angle and spins but his spin does not effect his bounce. I was thinking that if spinning when he hits the wall, he either gains or loses Y velocity.

What gives?





;;;;
also just noticed my paddle occasional is effected by the balls physics, (when a long distance is traveled by ball it occasionally moves/pushes pong paddle back) tho I have sent the ball to NOT send physics nor for the wall to receive physics.
:?
#7
11/12/2009 (6:35 pm)

You turned this forum into your blog :)
#8
11/12/2009 (6:51 pm)
Really, I thought this was for help.





How else am I supposed to let potential help know?
#9
11/13/2009 (5:50 am)
Just kidding man ;)

I personally don't have solution. But when i encounter a problem like this, i just do a lot of experiments with ALL combinations and settings. Also i echo() everything i can.

If that doesn't help, you'll have to find and read some good physics documentation. (unless someone else have the solution)
#10
11/13/2009 (9:41 am)
I am sure it is listed somewhere, but I had been working for most of the day, up to that point so I didn't feel like fiddling around and researching more. This is when I think (or hope anyway) that the forums can helpful.

So no worries,
Thanks anyways.





#11
11/13/2009 (9:53 am)
ps.
just for anyone interested I am trying to make a ball act with all normal physics applied to it, minus gravity.


Specifically I am trying to get it's spin to effect its direction after impact with a wall. Any guidance here would be helpful. Currently sniffing out collisionCircle's.