playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - marvoc

Pages: [1]
1
Hi again ;)
Im trying to resolve this problem:
I have an enemy (V1) and player (V2) vectors. I subtract them and get that line between. Then Im using "Get Vector Length" to get its length. And checking when enemy is near to the player by float value of length. This script is attached on enemy, so he has somehow range of attack. When player comes near, enemy attacks.
If you imagine enemy eg. as spider.
On the picture spider head is facing down. Should attack only what he see and this is the reason why I want make detection circle only by half (so red part shouldnt be taken, because of his back).
And of course enemy can rotate, so even this red area should rotate too, depend on its front (head).

Any tips? ;)
thanks

Martin

2
Hi all :)
I have one specific problem.
As you can see on picture Im raycasting from camera to player unit (blue hexagon) and then it continues.
Id like to have a sphere (red circles, there are two of them as to be 2 examples) which will move with vector.

This could be done (I suppouse) when Ill take direction vector somewhere on that raycast, lerp it and set it as position for the sphere.
First time I through Ill use 50% lenght of raycast between terrain and camera, but it will not work. Height is different in each position.

But I need to have sphere on exact height. Let say 30m from world origin. Never will go +/- Y. But should move in X and Z.

Why Im using raycast from camera through model? Because Im using air and groud units and from player point of view (is it shoot em up game) is this solutinon more precise then to have only colliders. Then is different angle when is it on bottom or on top of the screen.

3
Hello all:)
 I have only short question.
I have Shop scene when, after selling an item, Im deactivating its Buy button. This is working, but when I come again back from other scene, button is active again.
What I should do, to keep button deactivated?

Thanks :)

4
Playmaker Help / Raycast [SOLVED]
« on: January 30, 2019, 08:11:54 AM »
Hello again,
 thanks for previews answers. Now I have a different issue. I'd like to raycast from camera to moving unit, and length of raycast should be longer then only this distance.
https://drive.google.com/open?id=1njerDdGBtIGCqu49COWVXFfRBULK7bCQ
Moving units - gray circles
Raycast - as two lines

When I open Raycast rollout, I know about vector3 (camera center) to project from, but Im missing here something like Target (defined as Vector3). So in this case I wouldn't need vector3 direction vector.
https://hutonggames.fogbugz.com/default.asp?W492

Its possible to add something like this to raycast, or there is another way how to do it? ;) I think that "Vector3 direction" is already some defined line comapre to only point "Vector3".

Mayby completly bad question ;)

5
Hello :),
 I’ve started play with Playmaker one moth ago and now I reach point where Im not sure if is it an error or my mistake.
I made this showcase video:
https://drive.google.com/open?id=1OYd2BhGPmJ3f7mESwFGlo8NWsySW6sDk
Imagine that red box is a tank (shape when is scaled).

So my issue that box when is using Smooth Look At Direction is starting rotating, but for me, without reason. Im using nav mesh and mouse pick for move.
I tried move with keyboard and is still the same.
I want raycast below tank, so Y = -1, and its working if I check debug line.

Im adding picture of settings too.
And I checked sample "Raycast Hit Normal" too.. but there is everything fine :)


Any ideas? :)

And, btw, this is an amazing plugin for Unity :) thanks for it!

Pages: [1]