Unreal Engine 4 static mesh OnHit not triggered - static

I have a pretty basic but specific question that I can't seem to find the answer for. I've got a Blueprint containing a static Cube mesh, BlockAll collision without Physics Simulation enabled, for one of my levels. The entire floor is padded with them.
I've got it scripted up to have an effect once the player hits it, but it only seems to work when the player jumps on it. When he walks on it directly, the OnHit event does not trigger. Does this sound at all familiar? Am I missing a basic step here?

Got somewhat answered here by Erasio;
https://answers.unrealengine.com/questions/375634/static-mesh-doesnt-trigger-onhit.html

Related

How to fix an "structurally singular" - error in a simple loop model (Dymola)?

My Problem is maybe a rather simple one. I want to build up a simple Model of a Flettner Rotor. So it is just a fixed SupportStructure with a Motor/Revolute (fixedBearing) on top, that spins a hollow cylinder around it. At the Bottom there should be a loose fit, which i am not able to model...
On the attached pictures you can see the built up model and an animation of it. It is possible to simulate it without the "RevolutePlanarLoopConstraint".
I have to connect both structures again to model a second loose bearing. Because you have to create a loop, i tried all joints and constraints like "RevolutePlanarloppConstraint". In my opinion it should work ;)
No matter in what combination, i wasnt able to built up this connection. There is always the same error...(picture)
I cannot use the Rotor1D or something else, because i want to replace the bodys with existing discretized beam models later.
I think it is a typical problem of a locational/loose bearing combination, and i hope one of you has maybe a simple solution for it:)
Sadly i dont have the reputation to post images...
Kind regards
Paul

Processing and Kinect: Change speed of video according to distance from the sensor

I'm asking a question for a school project. I am trying to play a video in a loop and change its speed according to the distance from the Kinect 1414. When you are far the video plays at normal speed, which then increases as you get closer.
I tried in different ways but sometimes either the video doesn't loop or it doesn't show, I can only hear the audio. Other solutions don't let me change the speed of the video. Do you know any way to have the distance of a person affect the video?
Thanks.
Stack Overflow isn't designed for general "how do I do this" type questions like this. It's for specific "I tried X, expected Y, but got Z instead" type questions. But I'll try to help in a general sense.
You need to break your problem down into smaller pieces and then take on those pieces one at a time. For example, can you start with a very basic sketch that just displays the distance from the Kinect? Don't worry about the video yet, just display the distance on the screen.
Separately from that, can you create another sketch that just shows a video playing in a loop? Work your way up from there: can you make it so its speed is based on a hard-coded value? How about on a value like mouseX?
Get those two basic sketches working perfectly by themselves before you start thinking about combining them. Then if you get stuck on one of those steps, you can post a MCVE along with a specific question (in a new question post), and we'll go from there. Good luck.

Corona / Lua / frustrating timer multiplication

I am in the process of building a mobile game with Corona SDK, which is based on Lua. Until now i didn't need any help but this time I can't seem to find the cause, and I've been searching for it for hours.
It's one of those timer problems, where, after leaving, removing, and revisiting the scene, items that are spawned within a loop just multiply themselves every relaunch. More specificly, everytime a "forbidden" collision happens, which leads to the relaunch, according to my onCollision function.
What I already corrected after hours of strenuous research :
--the code inside the onCollision function is now inside the "began" phase,
so that can't cause the multiplication
--the scene phases are also correctly used
--transitions and timers are all canceled right before the relaunch
Since the code would be too long for you to look through, I'd rather ask for some hints :
What do you have in mind can cause such problems, besides what I already mentioned.
I appreciate every answer! Thanks alot.
The above comments are valid, it is going to be hard to diagnose the problem without being able to look at the code.
In the past, I have found it very helpful to name all my objects when dealing with collisions, so when a collision happens I know what objects caused it and it is very helpful for debugging purposes.
It looks like you have an issue with how you are starting the scene and deallocating resources when the scene ends. You may want to start/stop physics when the scene leaves and comes back, but without code I can't give a concrete answer.

Custom collision

I was recently assigned to create a siple game using the Corona SDK. The main pillar of the game would be a simple event: the user should put a ball in a basket, and I should be able to handle this event.
Here is a picture for better understanding:
I successfully managed to create the collision shape for the basket, but i have trouble with the collision of the inside of this basket. My first thought was the following:
create a new shape
size and position it to fit the "belly" of this basket
add it to the physics-world, and listen to the collision.
With hybrid drawing it looks like this:
But there is a problem: if i add this shape to the physics, it wouldn't let the ball fall into the, basket, it will handle this shape as a solid object as well.
So my question is: How could I get this custom object to collide, without blocking the
ball to fall through it? I have read a lots of forum post with similar questions but none of them got a proper answer. There must be a way to do this in an elegant way.
And one note: Please don't suggest checking the collision manually, with rectangle intersection, because in this simple case it would work, but later I may need to change the shape of the basket, and then it will be useless!
Box2D has a thing called "sensor".
You just set the internal collision one to be a sensor, and it will do exactly what you want :)
Just do:
MyInternalCollisionObject.isSensor = true

Robotic Navigation using Kinect

Till now I have been able to create an application where the Kinect sensor is at one place. I have used speech recognition EmguCV (open cv) and Aforge.NET to help me process an image, learn and recognize objects. It all works fine but there is always scope for improvement and I am posing some problems: [Ignore the first three I want the answer for the fourth]
The frame rate is horrible. Its like 5 fps even though it should be like 30 fps. (This is WITHOUT all the processing) My application is running fine, it gets color as well as depth frames from the camera and displays it. Still the frame rate is bad. The samples run awesome, around 25 fps. Even though I ran the exact same code from the samples it wont just budge. :-( [There is no need for code, please tell me the possible problems.]
I would like to create a little robot on which the kinect and my laptop will be mounted on. I tried using the Mindstorms Kit but the lowtorque motors dont do the trick. Please tell me how will I achieve this.
How do I supply power on board? I know that the Kinect uses 12 volts for the motor. But it gets that from an AC adapter. [I would not like to cut my cable and replace it with a 12 volt battery]
The biggest question: How in this world will it navigate. I have done A* and flood-fill algorithms. I read this paper like a thousand times and I got nothing. I have the navigation algorithm in my mind but how on earth will it localize itself? [It should not use GPS or any kind of other sensors, just its eyes i.e. the Kinect]
Helping me will be Awesome. I am a newbie so please don't expect me to know everything. I have been up on the internet for 2 weeks with no luck.
Thanks A lot!
Localisation is a tricky task, as it depends on having prior knowledge of the environment in which your robot will be placed (i.e. a map of your house). While algorithms exist for simultaneous localisation and mapping, they tend to be domain-specific and as such not applicable to the general case of placing a robot in an arbitrary location and having it map its environment autonomously.
However, if your robot does have a rough (probabilistic) idea of what its environment looks like, Monte Carlo localisation is a good choice. On a high level, it goes something like:
Firstly, the robot should make a large number of random guesses (called particles) as to where it could possibly be within its known environment.
With each update from the sensor (i.e. after the robot has moved a short distance), it adjusts the probability that each of its random guesses is correct using a statistical model of its current sensor data. This can work especially well if the robot takes 360ยบ sensor measurements, but this is not completely necessary.
This lecture by Andrew Davison at Imperial College London gives a good overview of the mathematics involved. (The rest of the course will most likely be very interesting to you as well, given what you are trying to create). Good luck!

Resources