TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Resolved Questions
→
[SOLVED] Is reversing gravity possible in-game?
Pages:
1
[SOLVED] Is reversing gravity possible in-game?
electricbill
Posts: 2
August 03, 2011, 04:56:00 am
Say I want to create a puzzle where pressing a button reverses gravity. Can this be done or will I have to set up 2 scenes (one with normal gravity, one with reversed gravity) and switch between them somehow?
« Last Edit: August 09, 2011, 02:25:11 am by electricbill »
Sunflower
Posts: 591
August 03, 2011, 05:49:44 am
In Scene >> World there are blocks: "[horizontal/vertical] gravity" and "set gravity to".
In Numbers & Text >> Math there is "negate" block.
Blocks to do this:
set gravity to (xDir: [negate[horizontal gravity]] yDir: [negate[vertical gravity]])
It will make gravity push in opposite direction.
Pages:
1