Suggestion: "Affected by Gravity" attribute for Actors
firemaplegames
Member Posts: 3,211
Hey,
I think a really helpful addition to GS (for me anyway!) would be a Boolean Attribute for Actors called "Affected By Gravity".
This way you could easily have moving actors without having to always apply upward accelerations to them.
You could easily have moving platforms, or horizontal projectiles, or whatever - without all the extra rules just to keep them afloat.
If that's an easy enough thing to add in a future release, I would really love it.
In the meantime, can anybody help me with this situation?:
I have an invisible actor, that controls the camera. It moves across the scene at a diagonal. I am applying an upward acceleration equal to the Scene's gravity, but it still falls. That only seems to work for actors that don't change their X or Y positions.
If it only moved horizontally, I could use the standard constrain Y workaround, but it has to be able to move diagonally.
I just need it to move in a straight line, seemingly unaffected by gravity.
Any help is greatly appreciated.
Joe
I think a really helpful addition to GS (for me anyway!) would be a Boolean Attribute for Actors called "Affected By Gravity".
This way you could easily have moving actors without having to always apply upward accelerations to them.
You could easily have moving platforms, or horizontal projectiles, or whatever - without all the extra rules just to keep them afloat.
If that's an easy enough thing to add in a future release, I would really love it.
In the meantime, can anybody help me with this situation?:
I have an invisible actor, that controls the camera. It moves across the scene at a diagonal. I am applying an upward acceleration equal to the Scene's gravity, but it still falls. That only seems to work for actors that don't change their X or Y positions.
If it only moved horizontally, I could use the standard constrain Y workaround, but it has to be able to move diagonally.
I just need it to move in a straight line, seemingly unaffected by gravity.
Any help is greatly appreciated.
Joe
Comments
Timer - Every .1 sec
change self.position.X to self.position.X + 1
and same for Y
Play around with the time and the number you are adding
So I'd have to use VectorToAngle on each iteration of the Timer, to set the X and Y. It just sounds processor intensive - although that could be the same exact way the Move To behavior works...
This actor is a "preview" camera. It shows where the goal of the level is located, then pans back through the scene to the player.
I just simply drag it out and place the actor on the "goal" of each level. It then moves back to the player automatically. But the goal can be below the player, or above him, or essentially way off in the distance somewhere.
It behaves sort of OK, and it does work, I just wish I could counteract the gravity perfectly. I have several elements in the scene that rotate in place, and they behave fine - since they are not changing their linear velocity. I am able to keep them afloat with upwards acceleration.
If they don't have to rotate/move, I can simply turn Movable off.
It's just this one actor, who needs to move through the scene, that's misbehaving.