-
Content Count
84 -
Joined
-
Last visited
Posts posted by F.hao
-
-
Oh my god, my mistake,
i messed up Vector Lerp and Rotation Lerp🤣
-
Hi guys, i got some test to understand this code. Then here is the answer:
And i think those answer is not right. Base the equation:OT=OA+dt*(OB-OA) ; I learn it from here :https://docs.unity3d.com/ScriptReference/Vector3.Lerp.html
So, for example, I count [0,0,0]to[0,90,90],and then t=0.5. I think the answer should be [0,45,45]; But like the picture before, the editor give me [19.471,45.000,45.000];and I really can't understand this.
So what's wrong with code, or maybe it's other problems?
-
6 hours ago, Mello1223 said:for me,it works good.
......Oh,Yes, for now i think raycast is work good. I think i make a misunderstanding. The point is: if the Begin position in another Object's body, then the raycast will ignore Object-self and keep going forward (before our test, i just thought it will hit Object-self). and @Igor Q. Everything is clear now.
By the way ,i found this problem because i'm trying make a function to let my AI-bot move in the ground, and there is some Entity to block road.
The origin idea is just found a position by raycast, and AI can go to the position. But then i found if my AI walk into the Entity, caused by some rotate event, like if AI near the wall,and suddenly rotate, then it will enter the wall, and once they already be in the wall, the raycast will not use. It will never help me found a right position to go.
And yes, i know this is not a Complete function, So at last, i choose bfs to find a road.😆
- 1
-
On 7/8/2022 at 9:37 AM, Igor Q. said:Hey
1) Have you checked to make sure collision is on for all objects?------Yes, Collision is enabled.
2) Have you checked the distance of the raycast? If your raycast distance is too far it will not work.---------I have test different distance, and i didn't find raycast to be invalid.so i think the length is not a problem.
3) Raycast inside (or beside an object) might cause it to immediately "hit"? Have you tried using a console text that printa the hit position?-----Yes i always text with console. And my ways is use a Entity's postion & axis_Z direction to fire a raycast. But once put the entity into another object, the raycast will
Hi Igor.Q Sorry for so late to reply.
I test again and here is my .yland. The answer is same, if you can check it.
-
Like this, if the Raycast Line start mushroom's postion, to the direction(0,0,1), then there is nothing can be hit.
So does this is a bug? Or maybe i want know why?
-
link here link there, maybe it's a bug.
-
If i remember right, the Fix Update Event will keep running when game start, and can't stop. Sometimes it's not good.
By the way, we can use Time delay command in the function callback, to simulate Time trigger.
-
9 hours ago, Nikki Severin said:Hey! Can you try setting your trigger zones that are a part of the animated groups as animated? This should work
It's just like magic!!!😭😭😭 Thank you again!
- 1
- 1
-
On 5/16/2022 at 9:44 PM, Nikki Severin said:Hello!
Can you please send us the problematic Scenario? You should be able to find it in this folder: C:\Program Files (x86)\Steam\userdata\<yoursteamid>\298610\remote\ScenariosYou can send it to me in a PM
Thank you!Hi Nikki, i just try to check which Combination made error at my Scenario, but i failed, i delete every father Combination, but still can't running my game.
Then i save all thing as a Combination, and i create a new scenario, put it in, but still error.🤣
-
-
I can't running my game, and i don't know how to fix this strange problem😂.Maybe someone can tell me how to enable Full StackTrances? -
10 hours ago, Mello1223 said:Hi. you probably creating an array with a negative index somewhere in the scripts. If the game also reports this error to you in the list of errors on the right side of the screen, you should have a box at the bottom to determine the exact error in the script, just click on that box
Hi Mello, i think it's not a code problem, this message not show in Debug bar, the left.
Well I'm just edit many many Combination and Welding Entity with many many pixel or some another cube. And i delete some, In fact i don't know which step it's going wrong, when i running it, game just tell me that.
But now everything is ok, game is running good. And the reason, i don't think i know.😂 I trying check every Combination by delete(first i save them to Components,that means they not in Edit Scene now)and running again. I almost delete all.Then suddenly game can running. and! the Combination is back to Edit scene! Those be deleted Combination was back!
Too weird.
Whatever, the game can running now.😅
-
Hi guys, what's this System Message? Once i running test my game, system show me this. and i 'm back to Editor scene.
Never happen before,What could i do to fix this problem?
-
Maybe waiting more time.
Or reduce the count of pixel.😂
-
6 hours ago, Oliver Hope said:Glad you found a solution. For the sniper scope, another option is to change the camera FOV instead of using a different camera. smaller FOV = more zoom. However there is a limit to how much you can zoom. Mello's suggestions is also a good option. Just a little tricky to get to work
😁😀😀 Consider there is still have many works, i choose this way.🤣🤣🤣, Although the most small Fov value is 30. Well, i think this sniper got a low quality scope.🤪
-
@Igor Q. @Mello1223 @Oliver Hope Hi pals, this is the final(almost) effect, i have to welding the gun and two arms together,as a arm-gun,then i can rotate it. And there will no shaking when move and rotate.
But in the same time, i can't simulate the shooting shaking by the gun(when shooting ,the gun will quick move backward and forward),because the gun and arm is bond and i set a Custom Controller on it. Also can't stimulate the reloading action, here you can see, i throw a bullet clip(ugly parabola😆), just try to let player know, this is reloading(Now i'm trying to rotate the arm-gun to make some animation).
I made many bugs and i try many time, some times i forget the camera's offset.
But, here is still get problem, you can see the video, when i use a sniper, and open the sight, in fact i'm replace a camera, the camera's z-offset is +6, then the view is forward. But, the view has through the entity! I think it's not good, can't be good. So, is there have some way to avoid or solve this camera-through-inside problem?
- 3
-
16 hours ago, Mello1223 said:Hi Mello, i know there is some problem we can't speak clear by English. lol, my English is also not good. Well, in fact the direction aim work good. And the problem with camera, yeah, i think it's not easy to solve, so i just change another way to simulate the shooting game. I'll upload a new video to show you by few hours.
-
15 hours ago, Igor Q. said:Can you send me the code and let me personally take a look?
Hi Igor Q,There is too mess. i can't split this part(Little busy now😭). And the note was written by Chinese words.
Whatever, i just give up. i'll never do this again. Never put the camera too close with items that moving/rotating.
---Later i'll upload a video, that's the end ways。。。
-
I‘m insane
-
23 minutes ago, Igor Q. said:@F.hao
You need to make your acceleration very, very high.Not work good. The following items Still can't Synchronize move.
God, i think i need find another way......
-
Hey Oliver, thank you. For the shaking items, it's just because the model's arms and weapon keep aiming the point, and the point is follow the head. So you know, because the aim code also can't instant start so the arms rotate animation seem like Not Synchronize. And then in the view, it's looks like shaking... That's all, especially when the camera too close those items.
Also about multiplayer, i'm testing it now. -----Oops.. I can't test it on server. Well, i close the entity's collision option, so i think maybe the fps will not so low?🤣
-
Hi guys, here i have another problem.When i use the Follow code. i found it's can't quick move with the Target, even i fill a big number to Max speed.
You can check it in the video. The model's head is the Target. body, arms, leg, and weapon follows. They can't move quick with head. There is always have a delay time.
【Problem 1】Most times it's okay, but when i bind the camera with the head, and the view it's very close to the head. Then you can see, the delay time is so obvious.
【Problem 2】Yeah, and another problem is those arms, weapon is shaking when i rotate the view.Yes, only those nearly items in the view can made this.
Like the video shows, i 'm trying to make a shooting game.Here i have used Custom controls, the head was assigned to Custom controls and i can get the camera's rotate(thanks again to @Mello1223), The another body parts all follow head. like weapon, because i need weapon to do some animation , like reload.So my dear friends, is there have another way to simulate a shooting model and camera view(Any idea, who knows)?
And, maybe @Nikki Severin you can check this code?
By the way, Merry Christmas to Everyone!
- 2
-
The whole game seems really big.And, i'm old than you, only one year.lol?
-
Very enlightening!
- 1
Confuse Lerp Instruction
in Bugs & Technical Issues
Posted · Edited by F.hao
But still, i think this rotation Lerp is not ok ,at [0,0,0]->[0,90,90]->t.
I think the Xaxis value should always be 0.
------For the whole afternoon, i think this is not a easy problem for now.😅