GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

AngularVelocity issue

Hello

I was playing around with having a wheel actor in a scene with an AngularVelocity of 100, which also changes position to follow the mouse cursor position. Then I put another wheel actor in the scene that I wanted to start to rotate in the opposite direction whenever it collides with the first. I set it to move to 0-AngularVelocity of the first wheel. My thinking was that when I move the first wheel so that it touches the 2nd, the 2nd would rotate in the opposite direction like they are moving against each other. But it doesn't happen. I fiddled around with it, but nothing I do makes the 2nd wheel change it's AngularVelocity to the same (or opposite of) the first wheel. There are only a few really simple rules going on it. Just wondering if there is some restriction about one actor having it's AngularVelocity set to the AngularVelocity of another actor, or if this is a glitch, or if I am just being a noob.

After collision: Change Attribute (self.Motion.angularVelocity) to (0-scene.Background.wheel01.angularVelocity)

Any help is appreciated

Comments

  • RThurmanRThurman Posts: 2,824Member, Sous Chef, PRO
    What you describe should work just fine.

    Perhaps you have something else that is making it not work. (For example, did you set angular drag on wheel02?) Try starting over with a clean new project that just has the bare essentials (the collision rule and change attribute behavior) in it.
  • hamhosehamhose Posts: 12Member
    I decided to give your suggestion a try. I created a new project, and imported one PNG file of a car tire (with transparency around it). I then created Actor 1, assigned the tire PNG to it, gave it a collision shape of a circle, and left everything else default. I created Actor 2 exactly the same way, using the same PNG. I gave each a collide rule to collide with the other. Actor 1 was set to follow the mouse position using a timer set to "every 0 seconds, change position X and Y to mouse position X and Y." Then I changed Actor 1 motion --> angularvelocity to 100. Then I set actor 2, upon colliding with Actor 1, to change attribute self.motion.angularvelocity to scene-->layers-->Background-->Actors-->Actor 1-->motion-->Angular Velocity

    Still doesn't work. Drag and Angular Drag are zero on both.

    I can't strip it down much more than that. I'm new enough to Gamesalad that I am not ruling out a stoopid noob blunder that I am not realizing. But the steps outlined above were literally all I did. Just wondering if anyone else has encountered this.
  • RThurmanRThurman Posts: 2,824Member, Sous Chef, PRO
    Hmm.... should work. Here is a quick example file:
  • hamhosehamhose Posts: 12Member
    Thanks. We have our answer! I assume this works on your system - which I believe is a Mac - but it does not work on my system, which is Windows. Wheel 2 fails to turn when it collides with Wheel 1, just as it failed in my attempt described above. This must be a Gamesalad for Windows glitch.

    Thanks for sending that file over. I was starting to pull my hair out!
Sign In or Register to comment.