News:

Function Finder  Find all the functions within source code files

Main Menu

Sprite Collision Mode Q.

Started by Tracy, February 23, 2006, 05:21:39 PM

Previous topic - Next topic

Tracy

Hi all.

Is is possible in PB to define a shape for the sprite other than a circle when it's in SpritecollisionMode 4? I really like the sliding mode for my map, but want to attach a different shape to my sprite. Just looking through the help menus, it doesn't seem to be possible.

Anyone?

Thanks.

-Tracy

kevin

#1
Currently it's a design short fall.  This will be addressed.  Which is going to update a LOT of people using sprites.   But thems's the breaks :)

What  you could prolly do is this.

Create sprite #1 using sliding mode
Create sprite #2 using shape mode (for inter sprite stuff)

attach sprite #2 to sprite #1  (spriteparent ThisSprite, Parentsprite command)

The command is not doc'd as from memory it was a little buggy..  Or just use two sprites for this object.  Move sprite #1, position sprite #2 and 1's position.  Run sprite collisions on sprite #2

One trick for screening out the sliding sprite from being drawn, would be to set it's Camera Visible bits to a different class.  Something impossible (ie a camera that doesn't exist) which will make sure it's not drawn through your scene/camera scene..

Tracy

QuoteCurrently it's a design short fall.  This will be addressed.  Which is going to update a LOT of people using sprites.   But thems's the breaks :)

What  you could prolly do is this.

Create sprite #1 using sliding mode
Create sprite #2 using shape mode (for inter sprite stuff)

attach sprite #2 to sprite #1  (spriteparent ThisSprite, Parentsprite command)

The command is not doc'd as from memory it was a little buggy..  Or just use two sprites for this object.  Move sprite #1, position sprite #2 and 1's position.  Run sprite collisions on sprite #2

One trick for screening out the sliding sprite from being drawn, would be to set it's Camera Visible bits to a different class.  Something impossible (ie a camera that doesn't exist) which will make sure it's not drawn through your scene/camera scene..

Hmmm.... that line of thought opens up a whole new realm of possibilities for me to deal with the issue. It's not so much that I want to use the circle for the environment and another shape for the sprite/sprite interaction, but that I want to use a different shape for the environment.

My original thought was to use a rectangular base for the sliding mode (the circle makes the edges of cliffs awfully precarious for my lil' guy), but after your post, I may just give him invisible 'training wheels' instead. One on one side of the midline, and another on the other side, then use the regular circle for the sprite's collision on ceilings, walls, etc. Something like this:

    .O.  

Should be interesting to code. I'll let you know how it goes.

P.S. Alternatively, how long will it be before the design flaw is 'addressed?' :) Anytime in the foreseeable future? If it's relatively soon, I may just take it the way it is and work on other stuff for now. (School imposes time constraints.)