Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Collision detection with Spine
Started by sporkfin Feb 13 2017 07:37 PM

4 replies to this topic
spine collision detection
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sporkfin

[GLOBAL: userInfoPane.html]
sporkfin
  • Contributor

  • 768 posts
  • Corona SDK

Hey Spiners,

 

Can any of you share some insights into how you perform collision detection on your Spine objects?

 

Do you define each element of an object for collision detection or approximate the entire object?

 

Do you run collision detection on key elements of the object e.g. fists or feet?

 

Thanks!

Jonathan



[TOPIC: post.html]
#2

Reaver

[GLOBAL: userInfoPane.html]
Reaver
  • Enthusiast

  • 87 posts
  • Corona SDK

This will depend on what you want to do with collision detection in each case.

 

If you have a classic platformer the spine rig doesn't need to be aware of the collision object at all (or vice versa). Like many FPS's uses capsule colliders for the player characters.

 

If you are doing a physics based fighting game, or something similar, you would maybe want to do colliders for some or all of the parts of the spine rig.

 

I've only done some very early stage experimentation with the latter so I can't give any good tips on it.



[TOPIC: post.html]
#3

sporkfin

[GLOBAL: userInfoPane.html]
sporkfin
  • Contributor

  • 768 posts
  • Corona SDK

Thanks!  I think my solution for now is going to be generating sprite sheets from spine - I know, it sounds funny as I'll give up the live rig for static images and larger file sizes but it will allow be to keep the collision detection I'm currently using.  I'll tackle this problem in the future and, hopefully, be able to share some insights at that time.



[TOPIC: post.html]
#4

Reaver

[GLOBAL: userInfoPane.html]
Reaver
  • Enthusiast

  • 87 posts
  • Corona SDK

What collision detection are you currently using? It is possible to use one physics collider while also using the Spine runtime to animate the characters.



[TOPIC: post.html]
#5

sporkfin

[GLOBAL: userInfoPane.html]
sporkfin
  • Contributor

  • 768 posts
  • Corona SDK

I haven't implemented any collision detection yet.  I see that Spine has some native options but the problem with kinematic bodies is they don't collide with other kinematic bodies so I'm looking for solutions for when two Spine bodies interact.




[topic_controls]
[/topic_controls]