I know how to make a fractured mesh and have one for a ceiling. How do I set up the Kismet so that when the player touches a trigger the mesh explodes and falls to the floor?
Thanks for any help!
First create your fractured mesh and add it to the scene then create a trigger volume
Next under physics actor classes drag and drop a radial impulse actor into the scene and and size it around the fractured mesh then go into its properties and set it to fracture
Open Kismet and inside Kismet have your trigger volume selected and place it down as a touch
then create a toggle hook the trigger to the on part of the toggle
Select the impulse actor and add it into kismet set the target of the toggle to the impulse actor
To ensure it does not start already on or off as well you can set the impulse actor to off upon level loaded ... Hope that helped!
http://forums.epicgames.com/archive/index.php/t-750148.html
Related
I am trying to create a "custom widget" (extends HBox) which renders 3D graphics.
The problem is that all the examples I see for setting the camera, show how to do it on the main "scene", which belongs to the main window.
I don't want any relation to the main Window, I want it to be an independent widget.
Is it anyway possible to do that?
I'll be glad if you can share some code example, as I feel pretty lost with it...
I am not quite sure if I understood you correctly, but if you want the camera to be transformable, you can insert it into the Scene Graph where ever you want. You can add it to a group node like this:
Group someGroup = new Group();
PerspectiveCamera camera = new PerspectiveCamera();
someGroup.getChildren().add(camera);
Scene s = new Scene(someGroup);
s.setCamera(camera);
When you now move the Group node the camera moves as well. You can add the camera to any Group node you want, but I am not sure what happens when you put it into a Group node that uses LayoutManagement like HBox.
The important thing is you always have to add the camera to the Scene that it is in.
I am using the new unity networking using unity 5.3.1 , my player prefab is a UI canvas , so when another client joins the canvas's overlap and I cannot press any button on host or client .
What i want is to disable other canvase's on each players game and just leave the local players canvase active , I have tried islocalplayer , isclient ,isserver but nothing works .
Is there a way around this please do tell.
Here are some options I can think of:
1) Instead of making canvas a player object, make panel a player object, so that all your players are different panels under same canvas. Now, when object are under same canvas, they ray casting order is determined by the order in hierarchy.
The objects that are lower in the hierarchy occlude those that are higher. So, what you can do is moving your player object to the lowest position in objects hierarchy, so that it will occlude all other players. This can be done using Transform methods SetSiblingIndex and GetSiblingIndex, like
transform.SetSiblingIndex(100000/*some big number*/);
2) Disable raycasting on all other players - what if you can click some component on canvas or not is whether it is a raycast target. Images and Text components can be raycast targets, or more generally any component that inherits from Graphics. You can iterate over all components of type Graphics in all players except the local player and mark raycastTarget = false.
I figured it out and as #NikaKasradze said use only one canvas and put all gui listeners in the islocalplayer bool check .
I stuck at this stage, how add that 3 towers in to the StackPane and how to move the bricks inside that pane (from 1-2-3 for example) using only JavaFX code without Scene Builder? I would be grateful for any answers!
Image:
My suggestion:
You create a class "Tower" which extends the class Pane and contains a list of disks. The class has a method "accept" which returns boolean depending on whether you can put a disk there or not.
Create 3 instances of the class Tower.
Then you create a class "Disk" which extends the class Rectangle. Create 8 instances with varying width and add them to the first tower, ie the list of the class Tower.
Each Disk will use a mouselistener as described in Drag nodes like in a patience/Klondike card game. The mechanism is very similar to what you need.
In the mousepressed handler of the mouse listener you check whether the disk is on top of the tower or not and hence whether you can drag it or not.
In the mousereleased handler of the mouse listener you simply check whether a disk intersects (see boundsInParent and intersects) with a given tower. If it does and the accept method returns true, you drop it there. If the accept method returns false, you let it fly back to where it came from.
You're finished when a Tower has all of the disks.
That's basically it.
Oh, and don't use a StackPane, use a Pane instead. And you don't need images. The picture you show can be created solely of rectangles.
I'm trying to make a Puzzle game in UDK and when I'm on a trigger I want player to see a text in front of them but the problem is that in the tutorial I watched in kismet he goes to: new action>Voice/Announcements>Play Announcement but in my kismet there is no "Voice/Announcements" How do I make it show or is there another way?
Select your trigger.
In kismet, right click, new event using trigger.
Select the kismet node and look at its properties. Find Sequence Object.
In Obj Comment, type the message you want displayed when the pawn touches the trigger.
Check Output Obj Comment To Screen.
I have a DAE model that is parsed into several parts. I am able to deal with them separately, such as changing their material or colour but I am having problems adding click or hover listeners over the children.
For example, lets say I have a model of a kitty where each facial feature is a child. I want to be able to hover or click the features and have a window pop up explaining the feature.
I've tried parsing the model and adding listeners but it doesn't seem to work.
Thanks in advance!
L
Hard to pin point the problem from your description, but you could check the following:
Make sure your viewport is interactive
Make sure the material your material is interactive
Make sure the DisplayObject3D you assign the listener to is not null.
Point 3, with collada objects, you can have nested objects, make sure you add a listener to an object that has geometry, not an empty(no geometry) container. With points 1,2, both viewport and material have a Boolean property called interactive which must be set to true for mouse events.
HTH