Questions tagged [motion]

Use this tag for physically moving systems. For example robots, or electronic or pneumatic actuators.

584 questions
1
vote
0 answers

Change Image Item after Motion Shake and Collision Detected in in UIDynamics Swift

I have the following code and I want to show an alert and change the image after the collision and based on a random number generated. However, it shows the result before the collision... Any idea??? import UIKit class ViewController:…
Alexandros
  • 11
  • 2
1
vote
0 answers

Detect speed of phone's movement

I need to check if the phone is moving too fast while capturing a series of images ( like the panorama option in Google Camera). I have tried this: public void onSensorChanged(SensorEvent event) { float x = event.values[0]; float y =…
Nick Isaacs
  • 172
  • 11
1
vote
0 answers

Step Counting on iPads

I know that iPad Air 2 has M8 motion co processor, but the CMPedometer.isStepCountingAvailable() always return false on this device. Does that mean the step counting is not available? On which iPads step counting is available? I appreciate any help.
parviin57
  • 106
  • 5
1
vote
1 answer

Game Maker motion_add - Python Equivalent

Is there a way to make a function that just adds motion to an object like the motion_add function from Game Maker? Like: motion_add(speed1, direction1, speed2, direction2) ... where speed1 and direction1 is the current values of the object…
deepadmax
  • 73
  • 2
  • 7
1
vote
1 answer

Implementing a State Machine in C++ for Embedded System

I'm designing a simple motor controller which can be in (at least) 4 states - Idle - Accelerate - Max-velocity - Decelerate. I figured trying to implement some sort of state machine would be the best way to go. Currently, using a switch statement…
M-R
  • 411
  • 2
  • 6
  • 15
1
vote
1 answer

How to create a MouseMotionListener that only accepts diagonal mouse movement in Java?

I want to create a MouseMotionListener in Java that implements the mouseDragged method so it only cares about diagonal mouse movement. I tried calculating the slope of the mouse position by saving the old X/Y and comparing it to a new X/Y like…
Seephor
  • 1,692
  • 3
  • 28
  • 50
1
vote
1 answer

How to store the detected object in video in a folder in each frame in matlab?

I want to store the detected object that is inside the yellow box and store each object with his label name in a separate file like object 1 in folder 1 object 2 in folder 2 only I want to save the detected object in the frame. Image: function…
1
vote
0 answers

Enemy's speed when following player

So I have this code before which is obviously very familiar. It currently moves all the zombies that I add to an arraylist towards my player, but if the zombie is positive of the player (to the right) then the zombie moves faster than it does on the…
1
vote
0 answers

PHASER ALTARA Struggling with motion paths, enemy ai and animations

Basically I want to make my sprite follow a motion path and depending on its direction it is going, it will play a particular animation. i.e. moving up will display its back, moving left will display the left side of the sprite and so on. I've tried…
pugmuffin
  • 11
  • 2
1
vote
0 answers

Paramiko does not allow to see Motion Streaming

I'm using motion to run a rudimentary livestream. It works perfectly when i start it in server side with: sudo motion -c livestream.conf This starts a video server in 8081 port and i can access perfectly from wherever i want inside my network. The…
David P.
  • 125
  • 9
1
vote
0 answers

Creating realistic x and y motion with a specified max speed?

I'm pretty new to java and I am having some major trouble doing what I thought would be fairly simple. Anyway, so far I have a character object that I want to only move at a max speed of 5 in ANY direction, because as we know if I set the x velocity…
theman22
  • 35
  • 1
  • 5
1
vote
1 answer

Mapping frames based on motion

I need to create 3 intermediate frames between two frames (prevImg, nextImg), I have found out the motion of each pixel using calcOpticalFlowFarneback() function in opencv calcOpticalFlowFarneback(gray1, gray2, flow, pyrScale, pyrLevel, winSize, …
Deepak
  • 1,038
  • 5
  • 17
  • 44
1
vote
2 answers

iOS Motion Detection: Count of times the device moves up and down

How can i use the gravity or motion sensors inside iPhone to calculate how many times the device moved up and down. e.g. as if it were lifted like a dumbbell for a couple of times, i wanted to count it. Forgive me if this is something very simply…
Viral Patel
  • 32,418
  • 18
  • 82
  • 110
1
vote
3 answers

android detect no movement

I'm using motion event, action_down, action_move etc, to detect when there is no finger movement but the finger is still on the screen. For instance, the user moves in a vertical line from top of the screen to the bottom and then stops movement…
Kaal
  • 111
  • 1
  • 10
1
vote
1 answer

Three.js importing a character with skeleton from 3ds max

I exported a rigged character from 3ds max in SEA3D format Loaded in Three.js Bone rotations have initial values. When I set these XYZ values to 0,0,0 my model looks completely messed up Model bones from blender all have initial values of 0, 0,…
Pawel
  • 16,093
  • 5
  • 70
  • 73