PaintCode-在路径上移动对象 [英] PaintCode - move object on the path

查看:76
本文介绍了PaintCode-在路径上移动对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想画一条曲线,并在上面附加一个对象.是否可以创建分数(从0.0到1.0),使我的对象在路径上移动?当分数为0时,对象位于起点处;当0.5处于中间位置时,对象则位于起点处;最后,当对象位于1.0时,对象位于终点处.当然,我想要一个弯曲的路径,而不是一条直线:)是否可以在PaintCode中进行?

I would like draw a curved line and attach an object to it. Is it possible to create fraction (from 0.0 to 1.0) which makes move my object on the path? When fraction is 0 then object is on the beginning, when 0.5 is on half way and finally when is on 1.0 it is at the end. Of course i want a curved path, not a straight line :) Is it possible to do in PaintCode?

推荐答案

如果仅需要作为进度条,则可以在PaintCode中使用它.诀窍是使用带有较大 Gap 的虚线笔划,然后只需更改 Dash .

If you need it only as a progress bar, it is possible in PaintCode. The trick is to use dashed stroke with very large Gap and then just change the Dash.

然后只需附加一个变量即可.

Then just attach a Variable and you are done.

关于原始帖子下的讨论,该解决方案使用作为单位,因此无论曲线如何弯曲,它都将沿曲线均匀分布.贝塞尔是.

Regarding the discussion under the original post, this solution uses points as the unit, so it will be distributed equally along the curve, no matter how curved the bezier is.

这篇关于PaintCode-在路径上移动对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆