Need help. Hero is ''Sinking'' through looping ground (FIXED)
ohtukrw
Sir dogeMember Posts: 106
Hi guys,
I am a new developer.
I finally set up my looping ground to loop to left x direction, my main actor starts to sink through that ground and disappears from the screen. How do I make the actor move along the ground so It moves as it was ground and not some water, lol?
Comments
Put a collide behavior with the ground.
Did that, but it bounces once and then sinks.
set the bounciness to 0 and fixed rotation to true in your player actor , and set the bounciness to 0 on your ground actors remove moveable and fixed rotation set bounciness to 0
When I unchecked the ''movable'' option on my ground actor it stops looping.
how is it looping in a circle or back and forth?
if its only back and forth, I do use an invisible actor below which is not moveable but collides with the platform above.
So your moving platform lies on top of an invisible ground that only collides with that moveable platform type but not with the player.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
TL;DR
Hi Dave, I have added an extra invisible actor and it worked, but using this method does it consume extra android GPU memory?
Long version:
my ground is 2 same images connected together, but the centre point is set in the middle of those 2 connected image where the edge of the right hand visible screen ends. I did those things from various online tutorials.
Backstage settings:
For movement.
1) Rule
if self.position.x = 0
do (change attribute) set self.position.x to 667 (images x centre position)
So the ground's image doesn't fall when in contact with another actor. ( Sigh)
2) Group
(change attribute)
set self.setY (which is an added 'real' option = 0) to self.position.y
(constrain attribute)
constraint self.position.Y to self.setY ('setY' is a name for added 'real' option = 0)
So the looping ground doesn't end up somewhere in memory, using android's gpu space.
3)Rule
if self.position.x <= -(self.size.width/2)
do destroy this actor.
1 extra actor for each platform or one big one across the whole scene as solid invisble base for all platforms is no big deal for performance at all
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de