Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Stencyl Essentials

You're reading from   Stencyl Essentials Build beautiful, unique, cross-platform games rapidly with the free Stencyl 2D game engine and toolset

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784399450
Length 206 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Sneyd Sneyd
Author Profile Icon Sneyd
Sneyd
Arrow right icon
View More author details
Toc

Coin collisions and physics settings


We now have all the visuals set up for our Coin actor. Next, we'll need to configure the physics settings. One thing we need to keep in mind is that, while we do want to be able to detect when the Player Character collides (overlaps) with a coin, we do not want him to react physically to this event (bounce, stop, slide, and so on). With this in mind, perform the following steps:

  1. In the context menu at the top of the Actor Type Editor, click on the Collisions tab.

  2. Stencyl has added a box collider by default. Leave it unaltered.

  3. Under Physics Properties, check Is a Sensor? to prevent the Player Character from reacting physically when it collides with one of the Coin actors. Sensors behave like triggers; a collision is detected when the collision box overlaps with another, but the physics engine doesn't react to this detected event.

  4. Switch to the Physics tab at the top of the context menu.

  5. Under General, set What Kind of Actor Type? to Cannot Move.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images