Jump to content

I am doing a school assignment using Kinect (Xbox 360) in Unity.

Everything is downloaded and installed, including a sample project. It all works and the body in the sample works fine.

That all works.

But the thing that doesn't work are the colliders.

 

The body is a different gameobject from the colliders (which I need in what I am making)

 

I have tried everything it feels like, but it just doesn't work :(

Do you guys have any suggestions or other sample projects I can use?

 

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/320303-kinect-unity3d-help/
Share on other sites

Link to post
Share on other sites

so all the colliders from other gameobjects don't work?but the rigidbody works?

|CPU: Intel i7-5960X @ 4.4ghz|MoBo: Asus Rampage V|RAM: 64GB Corsair Dominator Platinum|GPU:2-way SLI Gigabyte G1 Gaming GTX 980's|SSD:512GB Samsung 850 pro|HDD: 2TB WD Black|PSU: Corsair AX1200i|COOLING: NZXT Kraken x61|SOUNDCARD: Creative SBX ZxR|  ^_^  Planned Bedroom Build: Red Phantom [quadro is stuck in customs, still trying to find a cheaper way to buy a highend xeon]

Link to comment
https://linustechtips.com/topic/320303-kinect-unity3d-help/#findComment-4353679
Share on other sites

Link to post
Share on other sites

so all the colliders from other gameobjects don't work?but the rigidbody works?

The colliders don't seem to be aligned properly with the skeleton used.

When 2 colliders collide, nothing happens (I have a debug.log and some kind of event going on when 2 things collide)

I don't have rigidbodies, do I need that?

 

This is a small snip from the collision code:

void OnCollisionEnter (Collider other)	{		//Debug.Log("Enter");		if (other.name == "/AllCubes/CubeMiddle") 		{			BlokkenBewegen.MoveCube2();			print("touches "+transform.position.x);			lives--;		}         }

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/320303-kinect-unity3d-help/#findComment-4353768
Share on other sites

Link to post
Share on other sites

In unity, in order for a collision to happen at least one of the GameObjects needs a rigidbody.http://docs.unity3d.com/ScriptReference/Rigidbody.OnCollisionEnter.html

The reason for this is, that for a collision to happen, it needs to a collision response, but unity is not allowed to move a GameObject if it doesn't have a RigidBody. If you want to check if they are colliding without having a collision response happening, you should mark you colliders as triggers.

 

I hope this solves you problem.

Link to comment
https://linustechtips.com/topic/320303-kinect-unity3d-help/#findComment-4354368
Share on other sites

Link to post
Share on other sites

 

The colliders don't seem to be aligned properly with the skeleton used.

When 2 colliders collide, nothing happens (I have a debug.log and some kind of event going on when 2 things collide)

I don't have rigidbodies, do I need that?

here you go :)

In unity, in order for a collision to happen at least one of the GameObjects needs a rigidbody.http://docs.unity3d.com/ScriptReference/Rigidbody.OnCollisionEnter.html

The reason for this is, that for a collision to happen, it needs to a collision response, but unity is not allowed to move a GameObject if it doesn't have a RigidBody. If you want to check if they are colliding without having a collision response happening, you should mark you colliders as triggers.

 

I hope this solves you problem.

|CPU: Intel i7-5960X @ 4.4ghz|MoBo: Asus Rampage V|RAM: 64GB Corsair Dominator Platinum|GPU:2-way SLI Gigabyte G1 Gaming GTX 980's|SSD:512GB Samsung 850 pro|HDD: 2TB WD Black|PSU: Corsair AX1200i|COOLING: NZXT Kraken x61|SOUNDCARD: Creative SBX ZxR|  ^_^  Planned Bedroom Build: Red Phantom [quadro is stuck in customs, still trying to find a cheaper way to buy a highend xeon]

Link to comment
https://linustechtips.com/topic/320303-kinect-unity3d-help/#findComment-4358460
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×