Grappling hook for a Pawn simulated by physics - unreal-engine4

Making a sidescroller and is using a Pawn (Cube) with simulated physics and would like to make a magnetic grappling hook for movement.
Would you know a smart way to implement this?
many thanks!

If I understand you correctly , you want to animate the cube as its attached to magnetic grappling hook
Lucky its quite clear bec there is something called "Cable component" that do exactly what you looking for .
you just need to enable the plugin inside the engine. and follow the documentation steps Unreal docs cable component to achieve that , just scroll down to this part "Attaching Objects to the Cable ends" to give you solid start , then you can check how to use in inside blueprint to drive the game parameters you want.
Hope that works for you.

Related

How to create directional drag in Unity?

I'm developing a game in which you race in ships that are hovering above the ground. The problem is that they are really difficult to control because the have no friction other than the drag i set in Rigidbody component. Because of that steering is very unresponsive. Setting drag to really high values helps but it works in all directions and thats not what I want. The solution would be making the drag work only sideways so steering is easier, but going forward and backward is normal. Do you know how can I achieve this?
What's your code? Are you adding force by using rigidbody.AddForce? You know that it accepts a second parameter ForceMode.
For example:
rigidbody.addForce(Vector3.up, ForceMode.VelocityChange)
This wil add an instant force, ignoring it's mass. To see other ForceModes, look here :)

Path finding on a 2d plataformer game. Making enemies jump

I am working 2D Platform running game and I am stuck at this issue, i cant figure it out how to make my enemies jump through platforms as they follow the player. I used A* path finding with a Grid graph for my flying enemy and it works just fine. But with the ground troops i don't know what to do. Any recommendations where to start and what to study? Thanks in advance
Place a Trigger (Collider) attached with the Platform at the point where you want your enemy to Act (Jump in your case). and Attach a script to your Enemy to Handle its actions whenever it enters that trigger. you can make it Jump/Fly or whatever you want to. Thumb up if its helpful :)

animation with medal & ribbon at level finished

i am new to cocos2d and iphone. i have implemented one simple animation using particle system. it works fine. now i want some more animation like , when my star animation(using particles) completes , i want one medal with ribbon falling down from top to bottom in my screen, i want it's movement just same like we release medal from our hand & hold the ribbon. .can we achieve this kind of action or rather say animation using cocos2d ... any kind of help or idea would be appreciated a lot . .
i have implemented something like this :
I think rope physics would work, but it seems a little too much to add physics just for that.
I would say that the best strategy would be to make an CCSprite animated with CCAnimation.
There is a tutorial for that in this site: http://getsetgames.com/2010/04/18/how-to-animate-sprites-in-cocos2d/
[edit]
Cocos2d introduction to Rope Simulations: cocos2d-iphone.org/verlet-rope

How to Implement waving(Like pendulam) ropes effect in COCOS2D?

I am trying to implement wave effect when any thing hits the hanging object, how can I achieve the both,:
1.Hang an object in air(as it will be a dynamic body which will wave)
2.implement waving effect on that body
Thank You
The answer isn't in cocos2d but in your physics engine, if you are using box2d check the distance joint. not sure on chipmunk.
in testbed example see the chain example.
u can create no of small boxes and joint them looks like rope.
but be careful while specify the anchorpoint.

Iphone GUI physics code

When you drag an iphone GUI element like a list, it scrolls in a physics correct way, and also has a nice bounce effect at the end.
I would like to write a GUI element in my game, without using UIKit. I wonder where is the code implementing this, and if I can use it instead of trying to write something similar.
Any ideas?
I think that a physics engine would be overkill for just animating a gui element (unless you already have a physics engine in your game).
You could try using animations but I've no experience of doing this without UIKit but I suppose you would start here?
If you didn't want to use Core Animation, I would take a look at Robert Penner's easing equations - they're in actionscript but are pretty simple to port to C and would be a good start to get your own animation code started.
Hope this helps,
Sam
You can perhaps use animations to achieve this, you can define animation paths for bouncing or doing whatever it is you need and activate them when needed. I think the example project MoveMe can help you out
I can recommend the O'Reilly book "Physics for Game Developers" by David Bourg, which has great coverage of algorithms and code for all sorts of simulations. You probably want to start with motion affected by drag for the flick and gradual slowing, then look at a spring model to simulate the damping at the end.
box2d is an open source project that provides a great 2d physics engine.
this library is used by Intel clutter, which is a nice physics oriented UI library that is capable of running on mobile devices. that means that box2d is already optimized for mobile platforms like the iphone.