|
Post by Power Supersport on May 22, 2015 21:54:17 GMT
Hi, guys, I am working on my "X-Craft" game and a whole week I stuck on breaking blocks... Now I have a solution, but I need some help with this thing... I use scanner to detect the location of an imposter... Because all my blocks are 1x1x1 and their center is in the middle, the scanner will always return hit location integer value 1 (float value > 0.5) And now, getting directly to the question... How can I get "extended" point of a vector... On this image is shown exactly what I need to get... So, A is the start point of the scanner, B is the scan position (block is hit by the scanner and it returns B) but B is always more than 0.5 ... I need to find value C... With the same orientation of the scanner... All the points are Vector3() units... Just extended for example with 0.2m... Any ideas?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 29, 2015 15:40:54 GMT
do you also need the position of the z , or just x or y
|
|
|
Post by Power Supersport on May 29, 2015 15:42:36 GMT
I need the X,Y, Z... 3D point...
It's just like I scale the scanner and I get longer vector, but I have to script that...
I really thank you for taking a look...
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 29, 2015 15:43:12 GMT
so you need to find the value of the xyz axises, have to think about it for a minute
|
|
|
Post by Power Supersport on May 29, 2015 15:46:34 GMT
I mean...
The scanner hits the block, it returns a Vector3... This Vector3 has values that are higher than 0.5...
integer of 0.5 = 1...
All my game is based on integers because it's easier to make a blocky game with blocks 1x1x1m...
So, I need to get the core coordinates, which means that I must have value, smaller than 0.5...
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 29, 2015 16:02:33 GMT
some questions in the shoutbox
|
|
|
Post by Power Supersport on May 29, 2015 16:05:21 GMT
Yep...
|
|
|
Post by NicusorN5 on Mar 14, 2016 14:56:15 GMT
Maybe adding a offset??? what_emoticon
|
|