Difference between revisions of "Shadwen rope targets"
(Copied the article from the old wiki) |
(No difference)
|
Revision as of 09:22, 15 June 2018
Shadwen Editor Tutorial Main Page
-> Next tutorial (AI)
<- Previous tutorial (Dynamic Objects)
This tutorial covers things related to Shadwen's rope item and teaches the basics of setting rope targets to your level in a correct way. While parts of this tutorial can also be used to help with the Trine editors, this tutorial page is heavily focused on Shadwen, so not all of it will be helpful for those working with the Trine Editors.
Contents
Rope Targets
In Shadwen, if an object is made of wood, it's usually attachable by Shadwen's rope. In the editor, most of the wooden objects already function as rope targets by default. Below two components are needed to achieve this:
- AimedRopeTargetComponent
- BoxAreaComponent
"RopeTargetWoodCollisionHelper is the easiest object to create rope targets with.
This object can be found in the type tree under WoodCollisionHelper (ObjectEntity > object > Helper > CollisionHelper).
You can use these objects as they are straight from the get-go, no alterations are needed for them to function as rope targets."
The RopeTargetWoodCollisionHelper can be found in the type tree from: InstanceBase -> Entity ->ObjectEntity -> object -> Helper -> CollisionHelper -> WoodCollisionHelper
Making Rope Targets
AimedRopeTargetComponent
Inside the AimedRopeTargetComponent the first thing to look into is the Enabled property. This dictates whether or not the actual component is even used at all.
Target area
"Next up is choosing the area of the object which you can target with the rope. The properties that govern over this inside the component are WholePhysicsCanBeAttachPoint and AimTargetOffsets.
WholePhysicsCanBeAttachPoint means that the entire physical area of the object acts as a target for your rope. No matter where you try to connect the rope, it will attach.
AimTargetOffsets can be used to assign a certain point as the target for the rope. If you use this, you should see a small green wire sphere pop up in the middle of the object. This sphere marks the area which can be targeted with the rope. Then you can control where to place this sphere with the VC3 position under the AimTargetOffsets."
If you want only a certain part of an object to work as a rope target, you need to use AimTargetOffsets. To do this, press the button next to the AimTargetOffsets. This will open up a sub section under the property. If you change the coordinates of the sub section you should see a small green sphere move around. This makes the area of the sphere to function as the target. You can assign multiple different spheres onto one object to act as targets. The default position of the sphere is (0,0,0) as in the center of the object. If you cannot aim into the area where the green sphere is you cannot use the rope on the object, so it is recommended to move the sphere(s) outside of the collisions of the object. If you are using multiple target points Shadwen will tie the rope to the nearest available spot. For example, if you want to use this method for a box, you will need the same amount of spheres as sides you want to be interacted with, ie. if all sides must be able to be roped you will need a minimum of 6 target points.
Technically you can have both of these on at the same time, but the WholeAreaCanBeAttachPoint will override the AimTargetOffsets, so there isn't really any reason to use them both at the same time.
Turning an object into a rope target
"You can convert normal dynamic objects into rope targets by adding the AimedRopeTargetComponent and BoxAreaComponent into an object. Like any other component, you add them by selecting your object > Right click the object > Add component.
The easiest way to find these components is to use the search function. They can also be found in the type tree from: ComponentBase > AbstractAreaComponent > AreaComponentBase > BoxAreaComponent and ComponentBase > AbstractGameplayComponent > AbstractTargetableComponent > AimedRopeTargetComponent."
The AimedRopeTargetComponent requires the BoxAreaComponent to function properly.
- ComponentBase > AbstractGameplayComponent > AbstractTargetableComponent > AimedRopeTargetComponent holds all the different variations of the component. The main ones to look for are under RopeTargetWood, but they are not the only ones you can us.
- ComponentBase > AbstractAreaComponent > AreaComponentBase > BoxAreaComponent
More information about adding components in the Dynamic Objects tutorial.
"Some good components to use are AimedRopeTargetComponent(RopeTargetWoodCollisionHelperAimedopeTargetComponent) and BoxAreaComponent(NinjaRopeTargetGameplayEntityBoxAreaComponent"
All the different components function pretty much the same way, they have just been customized to optimally work on certain objects. It is good to check how the AreaComponent works, as you might want to tweak it in order to make it function properly for different shaped objects.
Shadwen Editor Tutorial Main Page
-> Next tutorial (AI)
<- Previous tutorial (Dynamic Objects)